Details about the LogLevel of Linux logs

Source: Internet
Author: User
The procsyskernelprintk file defines four numbers. Execute: catprocsyskernelprintk4417 ① console Log Level: messages with a higher priority will be printed to the console. ② Default Message Log Level: this value is used to print messages with no priority. ③ Lowest console Log Level: available at the console Log Level

The/proc/sys/kernel/printk file defines four numbers and runs:
Cat/Proc/sys/kernel/printk
4 4 1 7
① Console Log Level: messages with a higher priority will be printed to the console.
② Default Message Log Level: this value is used to print messages with no priority.
③ Lowest console log level: the minimum value that may be set for the console log level.
④ Default Console: the default Log Level of the console.
Each line of text in the log buffer starts with a level mark. The smaller the level value, the higher the importance. The system defines eight message levels,
Level numbers from 0 to 7 are respectively fatal (KERN_EMESG), alert level (KERN_ALERT), critical level (KERN_CRIT ),
Error level (KERN_ERR), alarm level (KERN_WARN), Attention Level (KERN_NOTICE), notification level (KERN_INFO ),
Debugging level (KERN_DEBUG ).

LogLevelCommand

Description: Details of error logs are controlled.

Syntax: LogLevel

Default Value:
LogLevel warn

LogLevel is used to adjust the details of the information recorded in the error log. (See ErrorLog command ). You can select the following levels and sort them in descending order of importance:

Level

Description

Example

Emerg emergency-the system is unavailable. "Child cannot open lockFile. Exiting"

Alert must take immediate action. "GetpwuId: Couldn't deteRmIne user name from uid"

Critical Condition of crit. "Socket: FailEdTo get a socket,ExIting child"

Error. "Premature end of script headers"

Warn warning. "Child process 1234 did not exit, sending another SIGHUP"

Notice is generally important. "Httpd: Caught SIGBUS, attemptingDuMp core in ..."

Info. "Server seems busy, (you may need to INcRease StartServers, or Min/MaxSpareServers )..."

Debug error level information Opening config file ..."

When a specific level is specified, information above all levels is also reported. For example, when LogLevel info is specified, all notice and warn-level information is also recorded.

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.