"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.17.5/bin/named/include/named/log.h" (4 Sep 2020, 1966 Bytes) of package /linux/misc/dns/bind9/9.17.5/bind-9.17.5.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "log.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 #ifndef NAMED_LOG_H
   13 #define NAMED_LOG_H 1
   14 
   15 /*! \file */
   16 
   17 #include <isc/log.h>
   18 #include <isc/types.h>
   19 
   20 #include <dns/log.h>
   21 
   22 #include <named/globals.h> /* Required for named_g_(categories|modules). */
   23 
   24 /* Unused slot 0. */
   25 #define NAMED_LOGCATEGORY_UNMATCHED (&named_g_categories[1])
   26 
   27 /*
   28  * Backwards compatibility.
   29  */
   30 #define NAMED_LOGCATEGORY_GENERAL ISC_LOGCATEGORY_GENERAL
   31 
   32 #define NAMED_LOGMODULE_MAIN    (&named_g_modules[0])
   33 #define NAMED_LOGMODULE_SERVER  (&named_g_modules[1])
   34 #define NAMED_LOGMODULE_CONTROL (&named_g_modules[2])
   35 
   36 isc_result_t
   37 named_log_init(bool safe);
   38 /*%
   39  * Initialize the logging system and set up an initial default
   40  * logging default configuration that will be used until the
   41  * config file has been read.
   42  *
   43  * If 'safe' is true, use a default configuration that refrains
   44  * from opening files.  This is to avoid creating log files
   45  * as root.
   46  */
   47 
   48 void
   49 named_log_setdefaultchannels(isc_logconfig_t *lcfg);
   50 /*%
   51  * Set up logging channels according to the named defaults, which
   52  * may differ from the logging library defaults.  Currently,
   53  * this just means setting up default_debug.
   54  */
   55 
   56 void
   57 named_log_setsafechannels(isc_logconfig_t *lcfg);
   58 /*%
   59  * Like named_log_setdefaultchannels(), but omits any logging to files.
   60  */
   61 
   62 isc_result_t
   63 named_log_setdefaultcategory(isc_logconfig_t *lcfg);
   64 /*%
   65  * Set up "category default" to go to the right places.
   66  */
   67 
   68 isc_result_t
   69 named_log_setunmatchedcategory(isc_logconfig_t *lcfg);
   70 /*%
   71  * Set up "category unmatched" to go to the right places.
   72  */
   73 
   74 void
   75 named_log_shutdown(void);
   76 
   77 #endif /* NAMED_LOG_H */