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