log.h 1.66 KB
Newer Older
1
/*
Automatic Updater's avatar
Automatic Updater committed
2
 * Copyright (C) 2004-2007, 2009  Internet Systems Consortium, Inc. ("ISC")
3 4
 * Copyright (C) 2001  Internet Software Consortium.
 *
Automatic Updater's avatar
Automatic Updater committed
5
 * Permission to use, copy, modify, and/or distribute this software for any
6 7 8
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
Mark Andrews's avatar
Mark Andrews committed
9 10 11 12 13 14 15
 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
16 17
 */

Automatic Updater's avatar
Automatic Updater committed
18
/* $Id: log.h,v 1.14 2009/01/18 23:48:14 tbox Exp $ */
19 20 21 22

#ifndef ISCCFG_LOG_H
#define ISCCFG_LOG_H 1

23
/*! \file isccfg/log.h */
24

25 26 27
#include <isc/lang.h>
#include <isc/log.h>

28 29
LIBISCCFG_EXTERNAL_DATA extern isc_logcategory_t cfg_categories[];
LIBISCCFG_EXTERNAL_DATA extern isc_logmodule_t cfg_modules[];
30

31
#define CFG_LOGCATEGORY_CONFIG	(&cfg_categories[0])
32

Andreas Gustafsson's avatar
spacing  
Andreas Gustafsson committed
33
#define CFG_LOGMODULE_PARSER	(&cfg_modules[0])
34 35 36 37

ISC_LANG_BEGINDECLS

void
38
cfg_log_init(isc_log_t *lctx);
39
/*%<
40 41 42 43
 * Make the libisccfg categories and modules available for use with the
 * ISC logging library.
 *
 * Requires:
44
 *\li	lctx is a valid logging context.
45
 *
46
 *\li	cfg_log_init() is called only once.
47 48
 *
 * Ensures:
Francis Dupont's avatar
Francis Dupont committed
49
 * \li	The categories and modules defined above are available for
50 51 52 53 54
 * 	use by isc_log_usechannnel() and isc_log_write().
 */

ISC_LANG_ENDDECLS

Brian Wellington's avatar
typo  
Brian Wellington committed
55
#endif /* ISCCFG_LOG_H */