On 2004.09.15, Janine A Sisk <[EMAIL PROTECTED]> wrote:
> In nsd 3.3 we have always had to use a script to get the logs to roll
> properly. I had "assumed" this problem would be fixed by now, but it's
> looking like it's not. I've got logroll set to true in my config file
> but the error log just keeps on growing. Access logs OTOH do seem to
> be rolling properly now.
What section did you set "logroll" to true? Server log settings go in
the "ns/parameters" section:
ns_section "ns/parameters"
ns_param logroll true
Now, the bug is still there -- while it's set up to roll the log on
receipt of SIGHUP, nothing actually sends it a SIGHUP. The nslog module
schedules a daily proc that initiates the access log roll, but the main
nsd doesn't do the same for the server log.
You can "patch" this by scheduling a daily proc from tcl:
ns_schedule_daily 0 0 ns_logroll
Stick that in your modules/tcl/log.tcl or something.
If someone could please file this as a bug on SF, I'd appreciate it.
> Another reason for us to do our own rolling was because we don't ever
> want access logs to be deleted, and it appears that there is no way to
> specify that; you have to give some value for max backup or else a
> default will be assumed. Is there a way around this?
For access logs, you could use the "rollfmt" param to have the log files
named with the date/time when they were rolled -- then, only if you
exceed "maxbackup" access log rolls where the "rollfmt" would yield the
same filename, would you lose log files.
I might suggest using "%Y-%m-%d" as the "rollfmt" -- if "maxbackup" is
set to 999, then only if you roll the access log 1000 or more times in
the same day, will you lose a logfile.
-- Dossy
--
Dossy Shiobara mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of
your email blank.