Thursday, August 15, 2013

How to increase/reduce the verbosity of the Apache httpd error log?

To increase or decrease the information being logged into Apache's error log file, LogLevel directive in httpd.conf file need to be set with any one of the following levels - emerg, alert, crit, error, warn, notice, info, debug

Eg:

LogLevel warn

emerg results in the least information being recorded and debug the most.

The path of the error log file is specified using ErrorLog directive in Apache httpd.conf file. 
The ErrorLog directive sets the name of the file to which the server will log any errors it encounters. If the file-path is not absolute then it is assumed to be relative to the ServerRoot.

Eg:

    ErrorLog logs/error_log       #ErrorLog path relative to ServerRoot

     (or)

   ErrorLog /var/log/httpd/error_log



No comments:

Post a Comment