Ubuntu System log configuration/var/log/messages, tumessages

Source: Internet
Author: User
Tags rsyslog

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/messagesThis 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.confAfter 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.confAdd 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_^
  
  

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.