xref: /netbsd-src/external/mpl/bind/dist/lib/isccfg/log.c (revision e6c7e151de239c49d2e38720a061ed9d1fa99309)
1 /*	$NetBSD: log.c,v 1.2 2018/08/12 13:02:40 christos Exp $	*/
2 
3 /*
4  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0. If a copy of the MPL was not distributed with this
8  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9  *
10  * See the COPYRIGHT file distributed with this work for additional
11  * information regarding copyright ownership.
12  */
13 
14 
15 /*! \file */
16 
17 #include <config.h>
18 
19 #include <isc/util.h>
20 
21 #include <isccfg/log.h>
22 
23 /*%
24  * When adding a new category, be sure to add the appropriate
25  * \#define to <isccfg/log.h>.
26  */
27 LIBISCCFG_EXTERNAL_DATA isc_logcategory_t cfg_categories[] = {
28 	{ "config", 	0 },
29 	{ NULL, 	0 }
30 };
31 
32 /*%
33  * When adding a new module, be sure to add the appropriate
34  * \#define to <isccfg/log.h>.
35  */
36 LIBISCCFG_EXTERNAL_DATA isc_logmodule_t cfg_modules[] = {
37 	{ "isccfg/parser",	0 },
38 	{ NULL, 		0 }
39 };
40 
41 void
42 cfg_log_init(isc_log_t *lctx) {
43 	REQUIRE(lctx != NULL);
44 
45 	isc_log_registercategories(lctx, cfg_categories);
46 	isc_log_registermodules(lctx, cfg_modules);
47 }
48