xref: /minix/external/bsd/bind/dist/lib/isccfg/log.c (revision fb9c64b2)
1 /*	$NetBSD: log.c,v 1.4 2014/12/10 04:38:02 christos Exp $	*/
2 
3 /*
4  * Copyright (C) 2004-2007  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.c,v 1.11 2007/06/19 23:47:22 tbox Exp  */
21 
22 /*! \file */
23 
24 #include <config.h>
25 
26 #include <isc/util.h>
27 
28 #include <isccfg/log.h>
29 
30 /*%
31  * When adding a new category, be sure to add the appropriate
32  * \#define to <isccfg/log.h>.
33  */
34 LIBISCCFG_EXTERNAL_DATA isc_logcategory_t cfg_categories[] = {
35 	{ "config", 	0 },
36 	{ NULL, 	0 }
37 };
38 
39 /*%
40  * When adding a new module, be sure to add the appropriate
41  * \#define to <isccfg/log.h>.
42  */
43 LIBISCCFG_EXTERNAL_DATA isc_logmodule_t cfg_modules[] = {
44 	{ "isccfg/parser",	0 },
45 	{ NULL, 		0 }
46 };
47 
48 void
49 cfg_log_init(isc_log_t *lctx) {
50 	REQUIRE(lctx != NULL);
51 
52 	isc_log_registercategories(lctx, cfg_categories);
53 	isc_log_registermodules(lctx, cfg_modules);
54 }
55