Apache logging module for breaking logs daily, CERN-style?

Apache logging module for breaking logs daily, CERN-style?

Post by Dwayne Jacques Fonten » Sat, 13 Jan 1996 04:00:00



hello,

We switched to Apache from CERN and are really enjoying the increased
speed and new features.

However, there are a few things that CERN did which Apache does not
do. One of these is wildcards in mappings, but I have already posted
asking about that several times with no response. :-(

The one I need at the moment is the ability for the server to break
it's log files on a daily boundary - in this case, midnight.

The CERN httpd could do this automatically, and I am interested in
doing this in Apache since it will save us quite a bit of work in the
long run.

I intend to implement this feature as a modification to the experimental
logging module.

The log files will be saved with names in [logname].Jan0195 format.

Is this task complicated by the fact that there are multiple processes
sharing the log's file descriptor? At first glance, it doesn't seem so.
It appears to be a simple check before each log line is written - if
the date is different than that represented by the current file desc,
close it and open a new one with today's date included in the name.

At second glance, I have these questions:

Will there be a problem with multiple children opening the log file in
append mode?

Are the children unable to open the file because they don't have the
proper permissions?

Does the real solution involve having the parent open the log file and
restart it's children at midnight?

Is there any way to do this with a preforking type server?

This is more difficult than I thought!

thank you for your time,

Dwayne Fontenot

 
 
 

Apache logging module for breaking logs daily, CERN-style?

Post by Rob Hartil » Sat, 13 Jan 1996 04:00:00



> The one I need at the moment is the ability for the server to break
> it's log files on a daily boundary - in this case, midnight.
> The CERN httpd could do this automatically, and I am interested in
> doing this in Apache since it will save us quite a bit of work in the
> long run.

[snip]

Quote:> This is more difficult than I thought!

it's actually easier than you think. run a script from crontab
to rotate the logfile. There's no need to overload apache with
this capability.

See
  http://www.apache.org/docs/howto.html#logreset

 
 
 

Apache logging module for breaking logs daily, CERN-style?

Post by Ben Lauri » Sun, 14 Jan 1996 04:00:00



Quote:>hello,

>We switched to Apache from CERN and are really enjoying the increased
>speed and new features.

>However, there are a few things that CERN did which Apache does not
>do. One of these is wildcards in mappings, but I have already posted
>asking about that several times with no response. :-(

I intend to do this in Apache 1.1, at some point.

<snip>

Cheers,

Ben.

---
Ben Laurie, * Consultant and      | Phone: +44 (181) 994 6435
Technical Director, A.L. Digital Ltd,     | Fax:   +44 (181) 994 6472

 
 
 

1. A daily log file with Apache ??

Hi!
I am running Apache 1.2.6 and because my access files grow quite large,
I'd like to make weekly logs. Is there any Apache-centric way to do it?

I, obviously, can run a cron job that would shut the server, rename
the file and start it again but... may be there is a "nicer" way to
do it?

Thanks,
                        Sergei

2. Cookies from heaven (Apache 1.1.1 problem)

3. Check your ppp.log or ppp.tun0.log in /var/log

4. mailing myself

5. ipppd logs in /var/log/ipppd-auth.log ??

6. C/C++ runtime libs

7. logging - "secure" logs don't tell me who is logging in?

8. Book recommendations

9. How can I get ipppd to log in /var/log/ipppd-auth.log ????

10. Can you log specific cookies with Apache %{cookie}i log format?

11. Apache Logs : wrong entries in log files

12. Apache 1.3.12 access.log logging error

13. Apache logging virtual hosts in one log file