[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SOLVED] Re: Changes in the syslog date format?



Nov 5, 2022, 14:53 by jim@k4vqc.com:

> On Sat, 2022-11-05 at 11:34 +0100, local10 wrote:
>
>> Nov 5, 2022, 09:55 by scdbackup@gmx.net:
>>
>> > Hi,
>> > 
>> > local10 wrote:
>> > 
>> > > Any ideas as to get the old syslog date format back?
>> > > 
>> > 
>> > The internet points to /etc/rsyslog.conf and in there:
>> > 
>> >  #
>> >  # Use traditional timestamp format.
>> >  # To enable high precision timestamps, comment out the following line.
>> >  #
>> >  $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
>> > 
>>
>>
>> Doesn't seem to work for me.
>>
>
> Didn't work for me earlier.  To fix this I had to add
>
> $template normal,"<%PRI%>%TIMESTAMP% %syslogtag%%msg%"
>


Got it working. Apparently, the $ActionFileDefaultTemplate directive is place sensitive and must be placed under the the GLOBAL DIRECTIVES section. Didn't work for me when it was placed at the end of rsyslog.conf file. Pretty strange.

###########################
#### GLOBAL DIRECTIVES ####
###########################

#
# Set the default permissions for all log files.
#
$FileOwner root
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022

## Enable old syslog date format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat



Thanks to everyone who responded.


Reply to: