/*
* Copyright (C) 1999-2002, 2004-2007, 2009, 2013, 2014, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id: log.c,v 1.49 2009/01/07 01:46:40 jinmei Exp $ */
/*! \file */
#include <config.h>
#ifndef ISC_FACILITY
#endif
/*%
* When adding a new category, be sure to add the appropriate
* bin/check/check-tool.c.
*/
{ "", 0 },
{ "client", 0 },
{ "network", 0 },
{ "update", 0 },
{ "queries", 0 },
{ "unmatched", 0 },
{ "update-security", 0 },
{ "query-errors", 0 },
{ "trust-anchor-telementry", 0 },
{ NULL, 0 }
};
/*%
* When adding a new module, be sure to add the appropriate
*/
{ "main", 0 },
{ "client", 0 },
{ "server", 0 },
{ "query", 0 },
{ "interfacemgr", 0 },
{ "update", 0 },
{ "xfer-in", 0 },
{ "xfer-out", 0 },
{ "notify", 0 },
{ "control", 0 },
{ "lwresd", 0 },
{ NULL, 0 }
};
/*
* Setup a logging context.
*/
if (result != ISC_R_SUCCESS)
return (result);
/*
* named-checktool.c:setup_logging() needs to be kept in sync.
*/
if (safe)
else
if (result != ISC_R_SUCCESS)
goto cleanup;
if (result != ISC_R_SUCCESS)
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
}
/*
* By default, the logging library makes "default_debug" log to
* stderr. In BIND, we want to override this and log to named.run
* instead, unless the -g option was given.
*/
if (! ns_g_logstderr) {
if (result != ISC_R_SUCCESS)
goto cleanup;
}
if (ns_g_logfile != NULL) {
if (result != ISC_R_SUCCESS)
goto cleanup;
}
#if ISC_FACILITY != LOG_DAEMON
&destination, 0);
if (result != ISC_R_SUCCESS)
goto cleanup;
#endif
/*
* Set the initial debug level.
*/
return (result);
}
if (! ns_g_logstderr) {
NULL, 0);
if (result != ISC_R_SUCCESS)
goto cleanup;
/*
* Setting the debug level to zero should get the output
* discarded a bit faster.
*/
} else {
}
if (ns_g_logfile != NULL) {
if (result != ISC_R_SUCCESS)
goto cleanup;
}
#if ISC_FACILITY != LOG_DAEMON
&destination, 0);
if (result != ISC_R_SUCCESS)
goto cleanup;
#endif
return (result);
}
if (result != ISC_R_SUCCESS)
goto cleanup;
if (! ns_g_logstderr) {
if (ns_g_logfile != NULL)
NULL);
else if (! ns_g_nosyslog)
NULL);
}
return (result);
}
return (result);
}
void
ns_log_shutdown(void) {
}