[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

httpd error_log

Posted on 2005-05-10
3
Medium Priority
?
218 Views
Last Modified: 2010-03-04
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?
0
Comment
Question by:rblampain
1 Comment
 
LVL 19

Accepted Solution

by:
ramazanyich earned 2000 total points
ID: 13972925
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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month20 days, 10 hours left to enroll

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question