]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
logging: use ISO-like timestamp in file log
authorJason Ish <jason.ish@oisf.net>
Thu, 22 Dec 2022 16:05:15 +0000 (10:05 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 10 Jan 2023 10:29:58 +0000 (11:29 +0100)
Also update suricata.yaml to show this default, as updating the
"default-log-format" does not affect the file output.

src/util-debug.h
suricata.yaml.in

index aab6c84d3d91f0249c65f4ea0f96ded6cb782750..167f9c2fa0165f5d77400b47ff691d99b9e52f46 100644 (file)
@@ -74,7 +74,7 @@ typedef enum {
 } SCLogOPType;
 
 /* The default log_format, if it is not supplied by the user */
-#define SC_LOG_DEF_FILE_FORMAT      "[%i - %m] %t %d: %S: %M"
+#define SC_LOG_DEF_FILE_FORMAT      "[%i - %m] %z %d: %S: %M"
 #define SC_LOG_DEF_LOG_FORMAT_REL   "%D: %S: %M"
 #define SC_LOG_DEF_LOG_FORMAT_RELV  "%d: %S: %M"
 #define SC_LOG_DEF_LOG_FORMAT_RELVV "[%i] %d: %S: %M"
index a2788d6a8a58ffface487f82627be7c57c7d913e..62df74e147df570e43bd2c290c5a348aa670e8f7 100644 (file)
@@ -577,6 +577,7 @@ logging:
       enabled: yes
       level: info
       filename: suricata.log
+      # format: "[%i - %m] %z %d: %S: %M"
       # type: json
   - syslog:
       enabled: no