syslog-ng: update to version 4.1.1
[feed/packages.git] / admin / syslog-ng / files / syslog-ng.conf
1 #############################################################################
2 # OpenWrt syslog-ng.conf specific file
3 # which collects all local logs into a single file called /var/log/messages.
4 # More details about these settings can be found here:
5 # https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
6
7 @version: 4.1
8 @include "scl.conf"
9
10 options {
11 chain_hostnames(no); # Enable or disable the chained hostname format.
12 create_dirs(yes);
13 keep_hostname(yes); # Enable or disable hostname rewriting.
14 log_fifo_size(256); # The number of messages that the output queue can store.
15 log_msg_size(1024); # Maximum length of a message in bytes.
16 stats_freq(0); # The period between two STATS messages (sent by syslog-ng, containing statistics about dropped logs) in seconds.
17 flush_lines(0); # How many lines are flushed to a destination at a time.
18 use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname.
19 };
20
21 # syslog-ng gets messages from syslog-ng (internal) and from /dev/log
22
23 source src {
24 internal();
25 unix-dgram("/dev/log");
26 };
27
28 source net {
29 network_localhost();
30 };
31
32 source s_network {
33 default-network-drivers(
34 # NOTE: TLS support
35 #
36 # the default-network-drivers() source driver opens the TLS
37 # enabled ports as well, however without an actual key/cert
38 # pair they will not operate and syslog-ng would display a
39 # warning at startup.
40 #
41 #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert"))
42 );
43 };
44
45 source kernel {
46 file("/proc/kmsg" program_override("kernel"));
47 };
48
49 destination messages {
50 file("/var/log/messages");
51 };
52
53 log {
54 source(src);
55 source(net);
56 source(kernel);
57 destination(messages);
58
59 # uncomment this line to open port 514 to receive messages
60 #source(s_network);
61 };
62
63 #
64 # Finally, include any user settings last so that s/he can override or
65 # supplement all "canned" settings inherited from the distribution.
66 #
67 @include "/etc/syslog-ng.d/" # Put any customization files in this directory