A destination is a message sink, where log is sent if filtering rules match. Similarly to sources, destinations may include several drivers which define how messages are dispatched. To declare a destination in the configuration file, you'll need a destination statement, whose syntax is as following:
destination <identifier> { destination-driver(params); destination-driver(params); ... }; |
Table 2-4. Available destination drivers in syslog-ng
Name | Description> |
---|---|
file | Writes messages to the given file |
fifo, pipe | Writes messages to the given named pipe |
unix-stream | Sends messages to the given unix socket in SOCK_STREAM style (Linux) |
unix-dgram | Sends messages to the given unix socket in SOCK_DGRAM style (BSD) |
udp | Sends messages to specified host and UDP port |
tcp | Sends messages to specified host and TCP port |
usertty | Sends messages to specified user if logged in |
program | Forks and launches given program, and sends messages to its standard input. |