1 /* $NetBSD: log.h,v 1.4 2014/12/10 04:38:02 christos Exp $ */ 2 3 /* 4 * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") 5 * Copyright (C) 2001 Internet Software Consortium. 6 * 7 * Permission to use, copy, modify, and/or distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /* Id: log.h,v 1.14 2009/01/18 23:48:14 tbox Exp */ 21 22 #ifndef ISCCFG_LOG_H 23 #define ISCCFG_LOG_H 1 24 25 /*! \file isccfg/log.h */ 26 27 #include <isc/lang.h> 28 #include <isc/log.h> 29 30 LIBISCCFG_EXTERNAL_DATA extern isc_logcategory_t cfg_categories[]; 31 LIBISCCFG_EXTERNAL_DATA extern isc_logmodule_t cfg_modules[]; 32 33 #define CFG_LOGCATEGORY_CONFIG (&cfg_categories[0]) 34 35 #define CFG_LOGMODULE_PARSER (&cfg_modules[0]) 36 37 ISC_LANG_BEGINDECLS 38 39 void 40 cfg_log_init(isc_log_t *lctx); 41 /*%< 42 * Make the libisccfg categories and modules available for use with the 43 * ISC logging library. 44 * 45 * Requires: 46 *\li lctx is a valid logging context. 47 * 48 *\li cfg_log_init() is called only once. 49 * 50 * Ensures: 51 * \li The categories and modules defined above are available for 52 * use by isc_log_usechannnel() and isc_log_write(). 53 */ 54 55 ISC_LANG_ENDDECLS 56 57 #endif /* ISCCFG_LOG_H */ 58