LogLevel used to adjust the level of detail in the information that is recorded in the error log
Level Description Example
Emerg emergency-System not available. "Child cannot open lock file. Exiting "
Alert must take immediate action. "Getpwuid:couldn ' t determine user name from UID"
Crit fatal condition. "Socket:failed to get a socket, exiting child"
Error condition. "Premature end of script headers"
Warn warning condition. "Child process 1234 did not exit, sending another Sighup"
Notice general important situation. "Httpd:caught Sigbus, attempting to dump core in ..."
Info General information. "Server seems busy, (you may need to increase startservers, or min/maxspareservers) ..."
Debug error level Information "Opening Config file ..."
It is generally recommended that you use Crit to warn settings
Edit the httpd.conf under the Conf folder and find the following:
=====================
The code is as follows |
Copy Code |
# # Loglevel:control The number of messages logged to the Error_log. # Possible values Include:debug, info, notice, warn, error, crit, # Alert, Emerg. # LogLevel warn
|
=====================
LogLevel parameters can be seen above. (see errorlog directives).
The default level is warn, then logs above warn level will be logged, resulting in a large number of Erro-level error logs that "file does not exist". It is recommended that you use the Crit level setting to record only the logs above the fatal level, effectively reducing the number of logs.
Change the loglevel warn to loglevel crit and restart Apache.
By changing the errorlog parameter in the httpd.conf configuration file to the following, you can generate a log file on a daily basis.
code is as follows |
copy code |
ErrorLog "| Bin/rotatelogs.exe-l logs/error-%y-%m-%d.log 1M " ErrorLog" |bin/rotatelogs.exe-l logs/error-%y-%m-%d.log 86400 " /p> |