A destination is where log is sent if filtering rules match. Similarly to sources, destinations are comprised of one or more drivers, each of which define how messages are handled. 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-3. 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. |