Ubuntu System Log Configuration/var/log/messages

Source: Internet
Author: User
Tags syslog rsyslog

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.