Skip to content

Commit

Permalink
[rsyslog]: Use timegenerated instead of timestamp (#944)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
marian-pritsak authored and lguohan committed Sep 9, 2017
1 parent 5098d98 commit 8f1ac5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/image_config/rsyslog/rsyslog.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f1ac5d

Please sign in to comment.