00001 /* 00002 * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") 00003 * Copyright (C) 2001 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.14 2009/01/18 23:48:14 tbox Exp $ */ 00019 00020 #ifndef ISCCFG_LOG_H 00021 #define ISCCFG_LOG_H 1 00022 00023 /*! \file isccfg/log.h */ 00024 00025 #include <isc/lang.h> 00026 #include <isc/log.h> 00027 00028 LIBISCCFG_EXTERNAL_DATA extern isc_logcategory_t cfg_categories[]; 00029 LIBISCCFG_EXTERNAL_DATA extern isc_logmodule_t cfg_modules[]; 00030 00031 #define CFG_LOGCATEGORY_CONFIG (&cfg_categories[0]) 00032 00033 #define CFG_LOGMODULE_PARSER (&cfg_modules[0]) 00034 00035 ISC_LANG_BEGINDECLS 00036 00037 void 00038 cfg_log_init(isc_log_t *lctx); 00039 /*%< 00040 * Make the libisccfg categories and modules available for use with the 00041 * ISC logging library. 00042 * 00043 * Requires: 00044 *\li lctx is a valid logging context. 00045 * 00046 *\li cfg_log_init() is called only once. 00047 * 00048 * Ensures: 00049 * \li The categories and modules defined above are available for 00050 * use by isc_log_usechannnel() and isc_log_write(). 00051 */ 00052 00053 ISC_LANG_ENDDECLS 00054 00055 #endif /* ISCCFG_LOG_H */