Ubuntu System log configuration/var/log/messages, tumessages
1. Problem Description
You need to view the system log file today, but cannot find it/var/log/messages
This file. Search for documents on the Internet, saying you want to configure/etc/syslog.conf
. Syslog uses a configurable and unified system registration program to receive log requests from all over the system at any time, and then according to/etc/syslog. pre-configured in conf to write log information into the corresponding file, mail it to the specific user, or send it directly to the console as a message.
Okay, the problem is coming again. Not in the system/etc/syslog.conf
After some searching, the final conclusion is: In Ubuntu, it should be/etc/rsyslog. conf and rsyslogd.
2. Solution
For details about the syslog. conf file and the file function in syslog. d, refer to the following article:
Http://blog.csdn.net/jeanphorn/article/details/45166633
By viewing the rsyslog. conf file, it is found that all the configuration files are in/etc/rsyslog.d/
Folder.
#/Etc/rsyslog. conf Configuration file for rsyslog.
#
# For more information see
#/Usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#
# Default logging rules can be found in/etc/rsyslog. d/50-default.conf
... ...
#
# Include all config files in/etc/rsyslog. d/
#
$ IncludeConfig/etc/rsyslog. d/*. conf
Open with vim/etc/rsyslog.d/50-default.conf
Add a line to the file as follows:
*.info;mail.none;authpriv.none;cron.none /var/log/messages
Restart the system and check the system logs. The system is okay !!! Pai_^