Modifying the Syslog log level

Source: Internet
Author: User
Tags syslog rsyslog
Modifying the syslog level

Linux still uses syslogd as the log monitoring process, but sometimes there is a need to modify the Syslog log level to meet the needs of certain tests that generate a large number of log files in a short period of time.
For example, if you do not want an info level log, you can modify the info level to the Err level (only err and above can be output to a file after modification)

1, modify the configuration file/etc/rsyslog.conf or/etc/syslog.conf (CENTOS6 later version, will syslog.conf changed to rsyslog.conf)
Has the following content:
# Don ' t log private authentication messages!
*. Info;mail.none;authpriv.none;cron.none/var/log/messages
Modify. Info to. Err.

2. Restart the syslog process (CENTOS6 later version)

Method One:
/etc/rc.d/init.d/syslog restart
/etc/rc.d/init.d/rsyslog restart

Method Two:
Service Rsyslog Restart

Note: If the old version, you can first PS under the "syslog" related processes, kill the corresponding process, and then restart, it should also be possible (this method has not been tried)

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.