1. Description of the problem
The log file for the system needs to be viewed today, but the file is not found /var/log/messages
. Online search for the material, said to be configured /etc/syslog.conf
. Syslog uses a configurable, unified system registration program that accepts log requests from all parts of the system at any time, and then writes the log information to the appropriate file, by mail to a specific user, or directly to the console, according to the pre-set in the/etc/syslog.conf.
OK, here comes the question again. The system is still not /etc/syslog.conf
, after some search, the final conclusion is: In Ubuntu should be the corresponding/etc/rsyslog.conf and RSYSLOGD.
2. Solution
For more information about the syslog.conf file and the Syslog.d file function, refer to the following article:
http://blog.csdn.net/jeanphorn/article/details/45166633
By looking at the rsyslog.conf file, all the profiles are found /etc/rsyslog.d/
under folders.
#/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
To open a /etc/rsyslog.d/50-default.conf
file with vim, add a line that reads:
*.info;mail.none;authpriv.none;cron.none /var/log/messages
Restart the system, and then to view the system log, found already okay!!! ^_^
Ubuntu System Log Configuration/var/log/messages