log.h

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.h,v 1.47 2011/10/13 22:48:24 tbox Exp $ */
00019 
00020 /*! \file dns/log.h
00021  * \author  Principal Authors: DCL */
00022 
00023 #ifndef DNS_LOG_H
00024 #define DNS_LOG_H 1
00025 
00026 #include <isc/lang.h>
00027 #include <isc/log.h>
00028 
00029 LIBDNS_EXTERNAL_DATA extern isc_log_t *dns_lctx;
00030 LIBDNS_EXTERNAL_DATA extern isc_logcategory_t dns_categories[];
00031 LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[];
00032 
00033 #define DNS_LOGCATEGORY_NOTIFY          (&dns_categories[0])
00034 #define DNS_LOGCATEGORY_DATABASE        (&dns_categories[1])
00035 #define DNS_LOGCATEGORY_SECURITY        (&dns_categories[2])
00036 /* DNS_LOGCATEGORY_CONFIG superseded by CFG_LOGCATEGORY_CONFIG */
00037 #define DNS_LOGCATEGORY_DNSSEC          (&dns_categories[4])
00038 #define DNS_LOGCATEGORY_RESOLVER        (&dns_categories[5])
00039 #define DNS_LOGCATEGORY_XFER_IN         (&dns_categories[6])
00040 #define DNS_LOGCATEGORY_XFER_OUT        (&dns_categories[7])
00041 #define DNS_LOGCATEGORY_DISPATCH        (&dns_categories[8])
00042 #define DNS_LOGCATEGORY_LAME_SERVERS    (&dns_categories[9])
00043 #define DNS_LOGCATEGORY_DELEGATION_ONLY (&dns_categories[10])
00044 #define DNS_LOGCATEGORY_EDNS_DISABLED   (&dns_categories[11])
00045 #define DNS_LOGCATEGORY_RPZ             (&dns_categories[12])
00046 #define DNS_LOGCATEGORY_RRL             (&dns_categories[13])
00047 #define DNS_LOGCATEGORY_CNAME           (&dns_categories[14])
00048 
00049 /* Backwards compatibility. */
00050 #define DNS_LOGCATEGORY_GENERAL         ISC_LOGCATEGORY_GENERAL
00051 
00052 #define DNS_LOGMODULE_DB                (&dns_modules[0])
00053 #define DNS_LOGMODULE_RBTDB             (&dns_modules[1])
00054 #define DNS_LOGMODULE_RBTDB64           (&dns_modules[2])
00055 #define DNS_LOGMODULE_RBT               (&dns_modules[3])
00056 #define DNS_LOGMODULE_RDATA             (&dns_modules[4])
00057 #define DNS_LOGMODULE_MASTER            (&dns_modules[5])
00058 #define DNS_LOGMODULE_MESSAGE           (&dns_modules[6])
00059 #define DNS_LOGMODULE_CACHE             (&dns_modules[7])
00060 #define DNS_LOGMODULE_CONFIG            (&dns_modules[8])
00061 #define DNS_LOGMODULE_RESOLVER          (&dns_modules[9])
00062 #define DNS_LOGMODULE_ZONE              (&dns_modules[10])
00063 #define DNS_LOGMODULE_JOURNAL           (&dns_modules[11])
00064 #define DNS_LOGMODULE_ADB               (&dns_modules[12])
00065 #define DNS_LOGMODULE_XFER_IN           (&dns_modules[13])
00066 #define DNS_LOGMODULE_XFER_OUT          (&dns_modules[14])
00067 #define DNS_LOGMODULE_ACL               (&dns_modules[15])
00068 #define DNS_LOGMODULE_VALIDATOR         (&dns_modules[16])
00069 #define DNS_LOGMODULE_DISPATCH          (&dns_modules[17])
00070 #define DNS_LOGMODULE_REQUEST           (&dns_modules[18])
00071 #define DNS_LOGMODULE_MASTERDUMP        (&dns_modules[19])
00072 #define DNS_LOGMODULE_TSIG              (&dns_modules[20])
00073 #define DNS_LOGMODULE_TKEY              (&dns_modules[21])
00074 #define DNS_LOGMODULE_SDB               (&dns_modules[22])
00075 #define DNS_LOGMODULE_DIFF              (&dns_modules[23])
00076 #define DNS_LOGMODULE_HINTS             (&dns_modules[24])
00077 #define DNS_LOGMODULE_ACACHE            (&dns_modules[25])
00078 #define DNS_LOGMODULE_DLZ               (&dns_modules[26])
00079 #define DNS_LOGMODULE_DNSSEC            (&dns_modules[27])
00080 #define DNS_LOGMODULE_CRYPTO            (&dns_modules[28])
00081 #define DNS_LOGMODULE_PACKETS           (&dns_modules[29])
00082 #define DNS_LOGMODULE_NTA               (&dns_modules[30])
00083 
00084 ISC_LANG_BEGINDECLS
00085 
00086 void
00087 dns_log_init(isc_log_t *lctx);
00088 /*%
00089  * Make the libdns categories and modules available for use with the
00090  * ISC logging library.
00091  *
00092  * Requires:
00093  *\li   lctx is a valid logging context.
00094  *
00095  *\li   dns_log_init() is called only once.
00096  *
00097  * Ensures:
00098  * \li  The categories and modules defined above are available for
00099  *      use by isc_log_usechannnel() and isc_log_write().
00100  */
00101 
00102 void
00103 dns_log_setcontext(isc_log_t *lctx);
00104 /*%
00105  * Make the libdns library use the provided context for logging internal
00106  * messages.
00107  *
00108  * Requires:
00109  *\li   lctx is a valid logging context.
00110  */
00111 
00112 ISC_LANG_ENDDECLS
00113 
00114 #endif /* DNS_LOG_H */

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