httpd error_log

Using Linux Fedora C2.
I have 2 problems with the "error_log" file:
- 1) it's getting too big at 238M
- 2) it's hard to decipher because it doesn't show the time for each entry

Questions:
How can I get rid of an "error_log" file I dont want anymore?
Is there a way to make it more "user-friendly" especially regarding - 2) above?
Any other tip?
rblampainAsked:
Who is Participating?
 
ramazanyichConnect With a Mentor Commented:
Which version of Apache do you use? How do you define error log file? is it ErrorLog directive ?
 On all pache servers error log file has timestamp. Every line is in folowing format:
[Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] client denied by server configuration: /export/home/live/ap/htdocs/test

I don't know why you don't have timestamp.


Apache httpd is capable of writing error and access log files through a pipe to another process, rather than directly to a file. In order to write logs to a pipe, simply replace the filename with the pipe character "|", followed by the name of the executable which should accept log entries on its standard input. Apache will start the piped-log process when the server starts, and will restart it if it crashes while the server is running. (This last feature is why we can refer to this technique as "reliable piped logging".)

Piped log processes are spawned by the parent Apache httpd process, and inherit the userid of that process. This means that piped log programs usually run as root. It is therefore very important to keep the programs simple and secure.

One important use of piped logs is to allow log rotation without having to restart the server. The Apache HTTP Server includes a simple program called rotatelogs for this purpose. For example, to rotate the logs every 24 hours, you can use:

    ErrorLog "|/usr/local/apache/bin/rotatelogs /var/log/error_log 86400"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.