[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
This commit is contained in:
Marian Pritsak 2017-09-09 04:25:25 +03:00 committed by lguohan
parent 5098d98976
commit 8f1ac5d5ec

View File

@ -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