log.c revision dafcb997e390efa4423883dafd100c975c4095d6
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews/*
1ca2cf024391992fe14b2df7d3ae0f575d074452Evan Hunt * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * Copyright (C) 2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * copyright notice and this permission notice appear in all copies.
f97d56e757b9a293ffbaa915ca4d792ae84ba85aTinderbox User *
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * PERFORMANCE OF THIS SOFTWARE.
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews */
6eba31815af00edc72a43ae1a79f84bd9eeb284eMark Andrews
8c9fba44a41e3ea23e7e8405029980aba672f7ceEvan Hunt/* $Id: log.c,v 1.5 2004/03/05 05:12:22 marka Exp $ */
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews#include <config.h>
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews#include <isc/util.h>
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews#include <isccfg/log.h>
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews/*
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * When adding a new category, be sure to add the appropriate
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * #define to <isccfg/log.h>.
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews */
94315060c2b0d9deafabe72d6a0482405fd9d377Evan HuntLIBISCCFG_EXTERNAL_DATA isc_logcategory_t cfg_categories[] = {
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews { "config", 0 },
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews { NULL, 0 }
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews};
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews/*
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * When adding a new module, be sure to add the appropriate
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews * #define to <isccfg/log.h>.
94315060c2b0d9deafabe72d6a0482405fd9d377Evan Hunt */
94315060c2b0d9deafabe72d6a0482405fd9d377Evan HuntLIBISCCFG_EXTERNAL_DATA isc_logmodule_t cfg_modules[] = {
94315060c2b0d9deafabe72d6a0482405fd9d377Evan Hunt { "isccfg/parser", 0 },
94315060c2b0d9deafabe72d6a0482405fd9d377Evan Hunt { NULL, 0 }
94315060c2b0d9deafabe72d6a0482405fd9d377Evan Hunt};
94315060c2b0d9deafabe72d6a0482405fd9d377Evan Hunt
94315060c2b0d9deafabe72d6a0482405fd9d377Evan Huntvoid
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrewscfg_log_init(isc_log_t *lctx) {
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews REQUIRE(lctx != NULL);
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews
b947e1a521c6931f787d6d1b3604d5b138170c3dMukund Sivaraman isc_log_registercategories(lctx, cfg_categories);
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews isc_log_registermodules(lctx, cfg_modules);
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews}
87708bde16713bc02ff2598f4a82f98c699a2f2dMark Andrews