tarakranjan
asked on
Put Year in Linux Syslog
Hi Friends,,
How can i format syslog to put Year in the time stamp.
/\
-t
How can i format syslog to put Year in the time stamp.
/\
-t
You have to use syslog-nd for that.
Then edit the config file for syslog-ng (/etc/syslog-ng/syslog-ng. conf) add add the ts_format() option:
Then edit the config file for syslog-ng (/etc/syslog-ng/syslog-ng.
options {
chain_hostnames(no);
stats_freq(43200);
# here you can specify the time format. iso includes the year
ts_format(iso);
};
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Don't forget fo restart your syslog after changing syslog.conf
ASKER
got the solutions
You will need to use another syslog program like syslog-ng