log.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2007, 2009, 2011-2014  Internet Systems Consortium, Inc. ("ISC")
00003  * Copyright (C) 1999-2001, 2003  Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and/or distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00010  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00011  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00012  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00013  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00014  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00015  * PERFORMANCE OF THIS SOFTWARE.
00016  */
00017 
00018 /* $Id: log.c,v 1.49 2011/10/13 22:48:24 tbox Exp $ */
00019 
00020 /*! \file */
00021 
00022 /* Principal Authors: DCL */
00023 
00024 #include <config.h>
00025 
00026 #include <isc/util.h>
00027 
00028 #include <dns/log.h>
00029 
00030 /*%
00031  * When adding a new category, be sure to add the appropriate
00032  * \#define to <dns/log.h>.
00033  */
00034 LIBDNS_EXTERNAL_DATA isc_logcategory_t dns_categories[] = {
00035         { "notify",     0 },
00036         { "database",   0 },
00037         { "security",   0 },
00038         { "_placeholder", 0 },
00039         { "dnssec",     0 },
00040         { "resolver",   0 },
00041         { "xfer-in",    0 },
00042         { "xfer-out",   0 },
00043         { "dispatch",   0 },
00044         { "lame-servers", 0 },
00045         { "delegation-only", 0 },
00046         { "edns-disabled", 0 },
00047         { "rpz",        0 },
00048         { "rate-limit", 0 },
00049         { "cname",      0 },
00050         { NULL,         0 }
00051 };
00052 
00053 /*%
00054  * When adding a new module, be sure to add the appropriate
00055  * \#define to <dns/log.h>.
00056  */
00057 LIBDNS_EXTERNAL_DATA isc_logmodule_t dns_modules[] = {
00058         { "dns/db",             0 },
00059         { "dns/rbtdb",          0 },
00060         { "dns/rbtdb64",        0 },
00061         { "dns/rbt",            0 },
00062         { "dns/rdata",          0 },
00063         { "dns/master",         0 },
00064         { "dns/message",        0 },
00065         { "dns/cache",          0 },
00066         { "dns/config",         0 },
00067         { "dns/resolver",       0 },
00068         { "dns/zone",           0 },
00069         { "dns/journal",        0 },
00070         { "dns/adb",            0 },
00071         { "dns/xfrin",          0 },
00072         { "dns/xfrout",         0 },
00073         { "dns/acl",            0 },
00074         { "dns/validator",      0 },
00075         { "dns/dispatch",       0 },
00076         { "dns/request",        0 },
00077         { "dns/masterdump",     0 },
00078         { "dns/tsig",           0 },
00079         { "dns/tkey",           0 },
00080         { "dns/sdb",            0 },
00081         { "dns/diff",           0 },
00082         { "dns/hints",          0 },
00083         { "dns/acache",         0 },
00084         { "dns/dlz",            0 },
00085         { "dns/dnssec",         0 },
00086         { "dns/crypto",         0 },
00087         { "dns/packets",        0 },
00088         { "dns/nta",            0 },
00089         { NULL,                 0 }
00090 };
00091 
00092 LIBDNS_EXTERNAL_DATA isc_log_t *dns_lctx = NULL;
00093 
00094 void
00095 dns_log_init(isc_log_t *lctx) {
00096         REQUIRE(lctx != NULL);
00097 
00098         isc_log_registercategories(lctx, dns_categories);
00099         isc_log_registermodules(lctx, dns_modules);
00100 }
00101 
00102 void
00103 dns_log_setcontext(isc_log_t *lctx) {
00104         dns_lctx = lctx;
00105 }

Generated on Tue Apr 28 17:41:04 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha