syslog-ng: conf: fix deprecated stats_freq
authorSergey Ponomarev <stokito@gmail.com>
Sun, 26 Nov 2023 08:50:56 +0000 (10:50 +0200)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Tue, 5 Mar 2024 21:18:49 +0000 (22:18 +0100)
The deprecated stats_freq() replaced with stats(freq(0)).

Also make comments shorter.
Fix tabs.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
(cherry picked from commit 37d2d69595e2e454c2562c3d963dc8065a24db70)

admin/syslog-ng/files/syslog-ng.conf

index 92574be61bb8abfeeff2217cc11a84b0ddd47439..50ddb78969fcbc88436bbd9037f34ee21781ea2d 100644 (file)
@@ -1,8 +1,5 @@
-#############################################################################
-# OpenWrt syslog-ng.conf specific file
-# which collects all local logs into a single file called /var/log/messages.
-# More details about these settings can be found here:
-# https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
+# Collect all local logs into a single file /var/log/messages.
+# See https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
 
 @version: 4.4
 @include "scl.conf"
@@ -13,7 +10,7 @@ options {
        keep_hostname(yes); # Enable or disable hostname rewriting.
        log_fifo_size(256); # The number of messages that the output queue can store.
        log_msg_size(1024); # Maximum length of a message in bytes.
-       stats_freq(0); # The period between two STATS messages (sent by syslog-ng, containing statistics about dropped logs) in seconds.
+       stats(freq(0)); # The period between two STATS messages (sent by syslog-ng, containing statistics about dropped logs) in seconds.
        flush_lines(0); # How many lines are flushed to a destination at a time.
        use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname.
 };
@@ -43,7 +40,7 @@ source s_network {
 };
 
 source kernel {
-        file("/proc/kmsg" program_override("kernel"));
+       file("/proc/kmsg" program_override("kernel"));
 };
 
 destination messages {
@@ -53,15 +50,13 @@ destination messages {
 log {
        source(src);
        source(net);
-        source(kernel);
+       source(kernel);
        destination(messages);
 
        # uncomment this line to open port 514 to receive messages
        #source(s_network);
 };
 
-#
-# Finally, include any user settings last so that s/he can override or
+# Include any user settings last so that s/he can override or
 # supplement all "canned" settings inherited from the distribution.
-#
 @include "/etc/syslog-ng.d/" # Put any customization files in this directory