logging documentation/feature issues
Andrew Brown
atatat at atatdot.net
Wed Aug 11 04:08:49 UTC 1999
not quite. :P
>well, with the proviso that this may not pass muster with the author of the
>logging subsystem, here's a thing to try:
>
>Index: src/lib/isc/logging.c
>===================================================================
>RCS file: /proj/cvs/isc/bind/src/lib/isc/logging.c,v
>retrieving revision 8.21
>diff -u -r8.21 logging.c
>--- src/lib/isc/logging.c 1999/07/07 19:33:35 8.21
>+++ src/lib/isc/logging.c 1999/08/10 21:50:12
>@@ -115,9 +115,7 @@
> regular = (sb.st_mode & S_IFREG);
>
> if (chan->out.file.versions) {
>- if (regular)
>- version_rename(chan);
>- else {
>+ if (!regular) {
> syslog(LOG_ERR,
> "log_open_stream: want versions but %s isn't a regular file",
> chan->out.file.name);
i found one problem already. :)
in src/bin/named/ns_parser.y, if a file is versioned, it asserts
LOG_TRUNCATE on that logging channel. then, when the file is
reopened, now without pre-rotation, the log file gets truncated. it's
similar lossage, but more immediate. i think we also need this:
*** ns_parser.y-orig Sun Aug 8 16:26:44 1999
--- ns_parser.y Wed Aug 11 00:07:09 1999
***************
*** 1001,1012 ****
version_modifier: T_VERSIONS L_NUMBER
{
chan_versions = $2;
- chan_flags |= LOG_TRUNCATE;
}
| T_VERSIONS T_UNLIMITED
{
chan_versions = LOG_MAX_VERSIONS;
- chan_flags |= LOG_TRUNCATE;
}
;
--- 1001,1010 ----
--
|-----< "CODE WARRIOR" >-----|
codewarrior at daemon.org * "ah! i see you have the internet
twofsonet at graffiti.com (Andrew Brown) that goes *ping*!"
andrew at crossbar.com * "information is power -- share the wealth."
More information about the bind-workers
mailing list