Loggers & Time Settings - DefiantCoder/Tech-Journals GitHub Wiki

Creates a time logger:

logger -t test whattimeisit
sudo cat /var/log/syslog | grep whattimeisit

to add the timezone comment out the following:

sudo vi /etc/rsyslog.conf

image

after this run the following commands to refresh your changes:

sudo systemctl restart rsyslog
logger -t test whattimeisit


sudo cat /var/log/syslog | grep whattimeisit

The following is for Web01

logger -t test time1onweb01
sudo cat /var/log/messages | grep time1onweb01
sudo vi /etc/rsyslog.conf

image

sudo systemctl restart rsyslog
logger -t test time2onweb01
sudo cat /var/log/messages | grep time2onweb01

image

The following is for Log01

logger -t test time10nlog01
sudo cat /var/log/messages | grep time10
sudo vi /etc/rsyslog.conf
# comment out the RSYSLOG_Traditional_Format


sudo systemctl restart rsyslog
logger -t test time10nlog01
sudo cat /var/log/messages | grep time10