Patches item #527073, was opened at 2002-03-07 10:11
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=303152&aid=527073&group_id=3152

Category: other
Group: None
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Pierre Asselin (pierrethebom)
Assigned to: Kriston Rehberg (kriston)
Summary: Optionally roll the server logs daily.

Initial Comment:
The patch is off of aolserver 3.4.2 .

Add two params to ns/parameters:
    1) "rollhour", to roll the server logs daily;
    2) "rollfmt", to append a timestamp instead of .nnn suffix.

The options are patterned after the nslog module.  Unmodified configs
preserve the current behavior.

Affected files:
    doc/config.txt, nslog/nslog.html:
        Document the new params.  Fix the "logroll" description
        to match reality.  Also fixed the nslog docs to match what
        nslog/nslog.c actually does...

    nsd/nsd.h:
        New field, "char *rollfmt" in the nsconf.log substruct.
    nsd/nsconf.c:
        NsConfInit(): initialize nsconf.log.rollfmt .

    nsd/log.c:
        Ns_LogRoll(): append a timestamp to the file name
        if rollfmt given, else append a counter.
        LogRollDailyCallback(): new schedulable wrapper around
        Ns_LogRoll().
        NsLogOpen(): schedule LogRollDailyCallback() if rollhour given.

I checked that the roll occurs, whether by SIGHUP or by daily schedule,
that timestamps or counters are appended to the log names as configured,
and that the "maxbackup" parameters are honored.  I didn't include a
test case because it would have to run for days to check everything.


----------------------------------------------------------------------

>Comment By: Pierre Asselin (pierrethebom)
Date: 2002-03-20 08:59

Message:
Logged In: YES
user_id=479653

I don't know about bug 434827, the description is too
succinct.  I do know that the documentation is wrong in
3.4.2, access logs can be scheduled to roll daily but
server logs only roll on SIGHUP.  The patch fixes the docs
and makes it possible to schedule server rolls as well.

----------------------------------------------------------------------

Comment By: Kriston Rehberg (kriston)
Date: 2002-03-20 08:26

Message:
Logged In: YES
user_id=16427

Most excellent.  To clarify:  does this patch address both
the server log and the access log?  Do you think this might
have anything to do with bug #434827?



----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=303152&aid=527073&group_id=3152

Reply via email to