mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
866. [func] Close debug only file channels when debug is set to
zero. [RT #1246]
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,3 +1,5 @@
|
|||||||
|
866. [func] Close debug only file channels when debug is set to
|
||||||
|
zero. [RT #1246]
|
||||||
|
|
||||||
865. [bug] The new configuration parser did not allow
|
865. [bug] The new configuration parser did not allow
|
||||||
the optional debug level in a "severity debug"
|
the optional debug level in a "severity debug"
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: log.c,v 1.65 2001/06/04 19:33:24 tale Exp $ */
|
/* $Id: log.c,v 1.66 2001/06/08 02:57:13 marka Exp $ */
|
||||||
|
|
||||||
/* Principal Authors: DCL */
|
/* Principal Authors: DCL */
|
||||||
|
|
||||||
@@ -931,9 +931,24 @@ isc_log_setcontext(isc_log_t *lctx) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level) {
|
isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level) {
|
||||||
|
isc_logchannel_t *channel;
|
||||||
|
|
||||||
REQUIRE(VALID_CONTEXT(lctx));
|
REQUIRE(VALID_CONTEXT(lctx));
|
||||||
|
|
||||||
lctx->debug_level = level;
|
lctx->debug_level = level;
|
||||||
|
/*
|
||||||
|
* Close ISC_LOG_DEBUGONLY channels if level is zero.
|
||||||
|
*/
|
||||||
|
if (lctx->debug_level == 0)
|
||||||
|
for (channel = ISC_LIST_HEAD(lctx->logconfig->channels);
|
||||||
|
channel != NULL;
|
||||||
|
channel = ISC_LIST_NEXT(channel, link))
|
||||||
|
if (channel->type == ISC_LOG_TOFILE &&
|
||||||
|
(channel->flags & ISC_LOG_DEBUGONLY) != 0 &&
|
||||||
|
FILE_STREAM(channel) != NULL) {
|
||||||
|
(void)fclose(FILE_STREAM(channel));
|
||||||
|
FILE_STREAM(channel) = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
|
Reference in New Issue
Block a user