From 8f1ac5d5ecbc1d95cd617575edc6efcb14f86e25 Mon Sep 17 00:00:00 2001 From: Marian Pritsak Date: Sat, 9 Sep 2017 04:25:25 +0300 Subject: [PATCH] [rsyslog]: Use timegenerated instead of timestamp (#944) * [rsyslog]: Use timegenerated instead of timestamp This is useful when rsyslog is used to put markers generated on other machines. This way all messages will have a timestamp from a single system. * [rsyslog] Use subseconds from local machine --- files/image_config/rsyslog/rsyslog.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/rsyslog/rsyslog.conf.j2 b/files/image_config/rsyslog/rsyslog.conf.j2 index 07d81de9348e..264ddd8dd7bf 100644 --- a/files/image_config/rsyslog/rsyslog.conf.j2 +++ b/files/image_config/rsyslog/rsyslog.conf.j2 @@ -37,7 +37,7 @@ $UDPServerRun 514 #$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat # Define a custom template -$template SONiCFileFormat,"%TIMESTAMP%.%timestamp:::date-subseconds% %HOSTNAME% %syslogseverity-text:::uppercase% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n" +$template SONiCFileFormat,"%timegenerated%.%timegenerated:::date-subseconds% %HOSTNAME% %syslogseverity-text:::uppercase% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n" $ActionFileDefaultTemplate SONiCFileFormat #Set remote syslog server