Document how to use -lsyslog
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
30d26f1d6d
commit
17f43903b6
36
README.md
36
README.md
@ -14,6 +14,7 @@ Table of Contents
|
|||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
* [Introduction](#introduction)
|
* [Introduction](#introduction)
|
||||||
|
* [Using -lsyslog](#using--lsyslog)
|
||||||
* [Build & Install](#build--install)
|
* [Build & Install](#build--install)
|
||||||
* [Building from GIT](#building-from-git)
|
* [Building from GIT](#building-from-git)
|
||||||
* [Origin & References](#origin--references)
|
* [Origin & References](#origin--references)
|
||||||
@ -67,6 +68,41 @@ Main differences from the original sysklogd package are:
|
|||||||
- Support for configuring remote syslog timeout
|
- Support for configuring remote syslog timeout
|
||||||
|
|
||||||
|
|
||||||
|
Using -lsyslog
|
||||||
|
--------------
|
||||||
|
|
||||||
|
libsyslog is by default installed as a library with a header file:
|
||||||
|
|
||||||
|
```C
|
||||||
|
#include <syslog/syslog.h>
|
||||||
|
```
|
||||||
|
|
||||||
|
The output from the `pkg-config` tool holds no surprises:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ pkg-config --libs --static --cflags libsyslog
|
||||||
|
-I/usr/local/include -L/usr/local/lib -lsyslog
|
||||||
|
```
|
||||||
|
|
||||||
|
The prefix path `/usr/local/` shown here is only the default. Use the
|
||||||
|
`configure` script to select a different prefix when installing libsyslog.
|
||||||
|
|
||||||
|
For GNU autotools based projects, use the following in `configure.ac`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Check for required libraries
|
||||||
|
PKG_CHECK_MODULES([syslog], [libsyslog >= 2.0])
|
||||||
|
```
|
||||||
|
|
||||||
|
and in your `Makefile.am`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
proggy_CFLAGS = $(syslog_CFLAGS)
|
||||||
|
proggy_LDADD = $(syslog_LIBS)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Build & Install
|
Build & Install
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
5
TODO.org
5
TODO.org
@ -1,8 +1,9 @@
|
|||||||
#+STARTUP: showall
|
#+STARTUP: showall
|
||||||
* sysklogd v2.0
|
* sysklogd v2.0
|
||||||
|
|
||||||
** TODO Document, and add examle of, how to use libsyslog
|
** TODO Check for memory/descriptor leaks, valgrind/Coverity
|
||||||
** TODO Check for memory/descriptor leaks, valgrind
|
** TODO Drop strlcpy() from libsyslog, make built-in?
|
||||||
|
** DONE Document, and add examle of, how to use libsyslog
|
||||||
** DONE Separate libsylog.{a,so} and syslog/syslog.h with NetBSD API
|
** DONE Separate libsylog.{a,so} and syslog/syslog.h with NetBSD API
|
||||||
** DONE Add syslogp() and vsyslogp() to libsyslog
|
** DONE Add syslogp() and vsyslogp() to libsyslog
|
||||||
** DONE Add support for =/etc/syslog.d/*.conf= to syslogd
|
** DONE Add support for =/etc/syslog.d/*.conf= to syslogd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user