logconf.c File Reference

#include <config.h>
#include <isc/file.h>
#include <isc/offset.h>
#include <isc/result.h>
#include <isc/stdio.h>
#include <isc/string.h>
#include <isc/syslog.h>
#include <isccfg/cfg.h>
#include <isccfg/log.h>
#include <named/log.h>
#include <named/logconf.h>

Go to the source code of this file.

Defines

#define CHECK(op)

Functions

static isc_result_t category_fromconf (const cfg_obj_t *ccat, isc_logconfig_t *logconfig)
 Set up a logging category according to the named.conf data in 'ccat' and add it to 'logconfig'.
static isc_result_t channel_fromconf (const cfg_obj_t *channel, isc_logconfig_t *logconfig)
 Set up a logging channel according to the named.conf data in 'cchan' and add it to 'logconfig'.
isc_result_t ns_log_configure (isc_logconfig_t *logconfig, const cfg_obj_t *logstmt)
 Set up the logging configuration in '*logconf' according to the named.conf data in 'logstmt'.


Detailed Description

Definition in file logconf.c.


Define Documentation

#define CHECK ( op   ) 

Value:

do { result = (op);                                      \
               if (result != ISC_R_SUCCESS) goto cleanup;        \
        } while (0)

Definition at line 37 of file logconf.c.


Function Documentation

static isc_result_t category_fromconf ( const cfg_obj_t ccat,
isc_logconfig_t logconfig 
) [static]

Set up a logging category according to the named.conf data in 'ccat' and add it to 'logconfig'.

Definition at line 47 of file logconf.c.

References cfg_list_first(), cfg_list_next(), cfg_listelt_value(), CFG_LOGCATEGORY_CONFIG, cfg_obj_asstring(), cfg_obj_log(), cfg_tuple_get(), isc_log_categorybyname(), ISC_LOG_ERROR, isc_log_usechannel(), isc_log_write(), ISC_R_SUCCESS, isc_result_totext(), and NS_LOGMODULE_SERVER.

Referenced by ns_log_configure().

static isc_result_t channel_fromconf ( const cfg_obj_t channel,
isc_logconfig_t logconfig 
) [static]

Set up a logging channel according to the named.conf data in 'cchan' and add it to 'logconfig'.

Definition at line 98 of file logconf.c.

References cfg_map_get(), cfg_map_getname(), cfg_obj_asboolean(), cfg_obj_asstring(), cfg_obj_asuint32(), cfg_obj_asuint64(), cfg_obj_isstring(), cfg_obj_isuint32(), cfg_obj_isuint64(), cfg_obj_log(), cfg_tuple_get(), isc_logdestination::facility, isc_logdestination::file, isc_file_isplainfile(), ISC_LOG_BUFFERED, isc_log_createchannel(), ISC_LOG_CRITICAL, ISC_LOG_DYNAMIC, ISC_LOG_ERROR, ISC_LOG_INFO, ISC_LOG_NOTICE, ISC_LOG_PRINTCATEGORY, ISC_LOG_PRINTLEVEL, ISC_LOG_PRINTTIME, ISC_LOG_ROLLINFINITE, ISC_LOG_ROLLNEVER, ISC_LOG_TOFILE, ISC_LOG_TOFILEDESC, ISC_LOG_TONULL, ISC_LOG_TOSYSLOG, ISC_LOG_WARNING, ISC_OFFSET_MAXIMUM, ISC_R_FAILURE, ISC_R_FILENOTFOUND, ISC_R_SUCCESS, isc_result_totext(), isc_stdio_close(), isc_stdio_open(), isc_syslog_facilityfromstring(), isc_logfile::maximum_size, isc_logfile::name, printtime(), str, isc_logfile::stream, and isc_logfile::versions.

Referenced by ns_log_configure().

isc_result_t ns_log_configure ( isc_logconfig_t logconfig,
const cfg_obj_t logstmt 
)

Set up the logging configuration in '*logconf' according to the named.conf data in 'logstmt'.

Definition at line 273 of file logconf.c.

References categories, category_fromconf(), cfg_list_first(), cfg_list_next(), cfg_listelt_value(), cfg_map_get(), cfg_obj_asstring(), cfg_tuple_get(), channel_fromconf(), CHECK, cleanup(), ISC_FALSE, ISC_R_SUCCESS, ISC_TRUE, ns_log_setdefaultcategory(), ns_log_setdefaultchannels(), and ns_log_setunmatchedcategory().

Referenced by load_configuration().


Generated on Tue Apr 28 17:41:07 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha