Rsyslog configuration, the simplest

Source: Internet
Author: User
Tags rsyslog

Separate by program name
First, refer to the original configuration
# A template to for higher precision timestamps + severity Logging
$ Template spicetmpl, "% timestamp %. % timestamp: Date-subseconds % syslogtag % syslogseverity-text %: % MSG ::: sp-if-no-1st-sp % MSG ::: drop-last-lf % \ n"

: Programname, startswith, "spice-vdagent"/var/log/spice-vdagent.log
Basic Format Description: if the program name is queuesort and the log name is queuesort. log, an example is as follows:
: Programname, startswith, "queuesort"/var/log/queuesort. Log

Logs can be separated based on information levels 0 to 7.
For example, local1.err *

Int syslog (INT priority, string message );

Log_emerg: in an emergency, you must notify the technical staff immediately.
Log_alert: a problem that should be corrected immediately. For example, if the system database is damaged, the ISP connection is lost.
Log_crit: important cases, such as hard disk errors and lost backup connections.
Log_err: the error is not urgent. Fix it within a certain period of time.
Log_warning: warning information, not an error. For example, the system disk uses 85%.
Log_notice: it is not an error and does not need to be processed immediately.
Log_info: intelligence information, normal system messages, such as harassment reports and bandwidth data, which do not need to be processed.
Log_debug: contains detailed development information, which is usually used only when debugging a program.

 


Logs can be separated by the facility level as follows:
Local0. */var/log/1
Local1. */var/log/2
# Local2. */var/log/3
Local3. */var/log/4
Local4. */var/log/5
Local5. */var/log/6
Local6. */var/log/7

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.