Deleted /var/log folder. Need help with messages and boot.log
Hi All,
I'm having some issues with the messages and boot.log (for syslogs) I deleted the /var/log folder by mistake on my machine and lost all the files. Post this, I rebooted the machine and some of the files have returned. Code:
[root@localhost ~]# ls -ltr /var/log I've got the rsyslog logging debug messages to boot.log Code:
# Save boot messages also to boot.log Code:
[root@localhost ~]# logger -s "Hello world" |
Not in front of a Linux box at the moment, but my recollection is that boot.log only shows the details (POST?) of the last boot. There’s nothing to update between boots.
To check:
|
It looks like you are running a Red Hat or derivative distribution. syslog messages are written to /var/log/messages or /var/log/secure.
Check the contents of /var/log/messages for your "Hello World" test. grep "Hello World" /var/log/messages Since logs rotate it might be in a /var/log/messages-2020MMDD file. |
Quote:
|
Quote:
|
What distribution version are you actually running?
Did you verify the /etc/rsyslog.conf file line for writing to messages is uncommented? Code:
# Log anything (except mail) of level info or higher. |
Quote:
|
1 Attachment(s)
Quote:
Yes this line is uncommented. I have attached the rsyslog.conf for your reference. Quote:
|
I re-installed the machine, re-installed rsyslog and boot.log is logging the local7.* messages coming from external sources.
|
All times are GMT -5. The time now is 07:19 PM. |