LogLevel 指令
描述: | 控制ErrorLog的详细程度 |
---|---|
句法: | LogLevel[module:]level[module:level]... |
默认: | LogLevel warn |
内容: | 服务器配置,虚拟主机,目录 |
状态: | 核心 |
模组: | 核心 |
兼容性: | Apache HTTP Server 2.3.6和更高版本中提供了按模块和按目录的配置 |
LogLevel
调整错误日志中记录的消息的详细程度(请参见ErrorLog
指令)。按重要性递减的顺序,可以使用以下级别:
Level | Description | Example |
---|---|---|
emerg | Emergencies - system is unusable. | "Child cannot open lock file. Exiting" |
alert | Action must be taken immediately. | "getpwuid: couldn't determine user name from uid" |
crit | Critical Conditions. | "socket: Failed to get a socket, exiting child" |
error | Error conditions. | "Premature end of script headers" |
warn | Warning conditions. | "child process 1234 did not exit, sending another SIGHUP" |
notice | Normal but significant condition. | "httpd: caught SIGBUS, attempting to dump core in ..." |
info | Informational. | "Server seems busy,(you may need to increase StartServers, or Min/MaxSpareServers)..." |
debug | Debug-level messages | "Opening config file ..." |
trace1 | Trace messages | "proxy: FTP: control connection complete" |
trace2 | Trace messages | "proxy: CONNECT: sending the CONNECT request to the remote proxy" |
trace3 | Trace messages | "openssl: Handshake: start" |
trace4 | Trace messages | "read from buffered SSL brigade, mode 0, 17 bytes" |
trace5 | Trace messages | "map lookup FAILED: map=rewritemap key=keyname" |
trace6 | Trace messages | "cache lookup FAILED, forcing new map lookup" |
trace7 | Trace messages, dumping large amounts of data | "| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |" |
trace8 | Trace messages, dumping large amounts of data | "| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |" |
crit
。当指定了特定级别时,还将报告来自所有其他更高级别的消息。例如,当LogLevel info
指定时,日志级别为notice
和的消息warn
也将被发布。例如:
LogLevel notice
注意
当记录到常规文件时,该级别的消息notice
无法被抑制,因此总是被记录。但是,当使用完成日志记录时,这并不适用syslog
。
指定不带模块名称的级别会将所有模块的级别重置为该级别。使用模块名称指定级别将仅设置该模块的级别。可以使用模块源文件名,模块标识符或带有_module
省略尾随的模块标识符作为模块规范。这意味着以下三个规格是等效的:
LogLevel info ssl:warn LogLevel info mod_ssl.c:warn LogLevel info ssl_module:warn
也可以更改每个目录的级别:
LogLevel info <Directory "/usr/local/apache/htdocs/app"> LogLevel debug </Directory>
每个目录的日志级别配置仅影响解析请求后记录的消息以及与请求相关联的消息。与连接或服务器关联的日志消息不受影响。
参见
ErrorLog
ErrorLogFormat
- Apache HTTP服务器日志文件