Good day,

I have the need for a timestamp WITH the year and tried

----[ /etc/rsyslog.conf ]-----------------------------------------------

$template CustomDateTime, "%timegenerated:::date-strftime(%Y-%m-%d %H:%M:%S)% 
%HOSTNAME% %syslogtag%%msg%O\n"
$ActionFileDefaultTemplate CustomDateTime
------------------------------------------------------------------------

But I get the error message:

----[ /var/log/mail.log ]-----------------------------------------------

Jan 27 15:56:50Y-**INVALID PROPERTY NAME**m-**INVALID PROPERTY NAME**d 
**INVALID PROPERTY NAME**H:**INVALID PROPERTY NAME**M:**INVALID PROPERTY 
NAME**S)**INVALID PROPERTY NAME** mail courierd: Waiting.  shutdown time=none, 
wakeup time=Fri Jan 27 16:01:50 2017, queuedelivering=7, inprogress=1O

------------------------------------------------------------------------

What I want is to add the YEAR to the timestamp, mean:
changeing from

Jan 27 15:50:55 mail courieresmtpd:  started,ip=[::ffff:141.146.126.229]

to

Jan 27 2017 15:50:55 mail courieresmtpd:  started,ip=[::ffff:141.146.126.229]

How to do this?

Note:  This does not work either:

----[ /etc/rsyslog.conf ]-----------------------------------------------

$template CustomDateTime, 
"%timestamp:::date-year%-%timestamp:::date-month%-%timestamp:::date-day% 
%timestamp:::date-hour%:%timestamp:::date-minute%:%timestamp:::date-second% 
%HOSTNAME% %syslogtag% %msg%\n"
$ActionFileDefaultTemplate CustomDateTime
------------------------------------------------------------------------


Thanks in avance
Michelle

Attachment: signature.asc
Description: Digital signature

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to