log.h File Reference

#include <isc/log.h>
#include <isc/types.h>
#include <dns/log.h>
#include <named/globals.h>

Go to the source code of this file.

Defines

#define NAMED_LOG_H   1
#define NS_LOGCATEGORY_CLIENT   (&ns_g_categories[1])
#define NS_LOGCATEGORY_NETWORK   (&ns_g_categories[2])
#define NS_LOGCATEGORY_UPDATE   (&ns_g_categories[3])
#define NS_LOGCATEGORY_QUERIES   (&ns_g_categories[4])
#define NS_LOGCATEGORY_UNMATCHED   (&ns_g_categories[5])
#define NS_LOGCATEGORY_UPDATE_SECURITY   (&ns_g_categories[6])
#define NS_LOGCATEGORY_QUERY_EERRORS   (&ns_g_categories[7])
#define NS_LOGCATEGORY_GENERAL   ISC_LOGCATEGORY_GENERAL
#define NS_LOGMODULE_MAIN   (&ns_g_modules[0])
#define NS_LOGMODULE_CLIENT   (&ns_g_modules[1])
#define NS_LOGMODULE_SERVER   (&ns_g_modules[2])
#define NS_LOGMODULE_QUERY   (&ns_g_modules[3])
#define NS_LOGMODULE_INTERFACEMGR   (&ns_g_modules[4])
#define NS_LOGMODULE_UPDATE   (&ns_g_modules[5])
#define NS_LOGMODULE_XFER_IN   (&ns_g_modules[6])
#define NS_LOGMODULE_XFER_OUT   (&ns_g_modules[7])
#define NS_LOGMODULE_NOTIFY   (&ns_g_modules[8])
#define NS_LOGMODULE_CONTROL   (&ns_g_modules[9])
#define NS_LOGMODULE_LWRESD   (&ns_g_modules[10])

Functions

isc_result_t ns_log_init (isc_boolean_t safe)
isc_result_t ns_log_setdefaultchannels (isc_logconfig_t *lcfg)
 Initialize the logging system and set up an initial default logging default configuration that will be used until the config file has been read.
isc_result_t ns_log_setsafechannels (isc_logconfig_t *lcfg)
 Set up logging channels according to the named defaults, which may differ from the logging library defaults. Currently, this just means setting up default_debug.
isc_result_t ns_log_setdefaultcategory (isc_logconfig_t *lcfg)
 Like ns_log_setdefaultchannels(), but omits any logging to files.
isc_result_t ns_log_setunmatchedcategory (isc_logconfig_t *lcfg)
 Set up "category default" to go to the right places.
void ns_log_shutdown (void)
 Set up "category unmatched" to go to the right places.


Detailed Description

Definition in file log.h.


Define Documentation

#define NAMED_LOG_H   1

Definition at line 21 of file log.h.

#define NS_LOGCATEGORY_CLIENT   (&ns_g_categories[1])

Definition at line 33 of file log.h.

Referenced by client_newconn(), client_request(), client_senddone(), ns_client_attach(), ns_client_detach(), ns_client_error(), ns_client_settimeout(), process_ecs(), query_find(), and query_recurse().

#define NS_LOGCATEGORY_NETWORK   (&ns_g_categories[2])

Definition at line 34 of file log.h.

#define NS_LOGCATEGORY_UPDATE   (&ns_g_categories[3])

Definition at line 35 of file log.h.

Referenced by respond(), send_forward_event(), and update_log().

#define NS_LOGCATEGORY_QUERIES   (&ns_g_categories[4])

Definition at line 36 of file log.h.

Referenced by log_query().

#define NS_LOGCATEGORY_UNMATCHED   (&ns_g_categories[5])

Definition at line 37 of file log.h.

Referenced by ns_client_dumpmessage(), and ns_log_setunmatchedcategory().

#define NS_LOGCATEGORY_UPDATE_SECURITY   (&ns_g_categories[6])

Definition at line 38 of file log.h.

Referenced by checkqueryacl(), and checkupdateacl().

#define NS_LOGCATEGORY_QUERY_EERRORS   (&ns_g_categories[7])

Definition at line 39 of file log.h.

Referenced by log_queryerror(), ns_client_error(), query_resume(), and rpz_log_fail().

#define NS_LOGCATEGORY_GENERAL   ISC_LOGCATEGORY_GENERAL

Definition at line 44 of file log.h.

Referenced by add_keydata_zone(), add_listener(), adjust_interfaces(), assertion_failed(), check_lockfile(), cleanup(), client_ok(), configure_staticstub(), configure_view(), configure_view_dnsseckeys(), configure_zone(), configure_zone_ssutable(), control_newconn(), control_senddone(), create_empty_zone(), create_managers(), dns64_reverse(), do_addzone(), do_modzone(), dump_counters(), dump_symboltable(), dumpdone(), fatal(), generate_salt(), generate_session_key(), get_rndckey(), get_view_querysource_dispatch(), library_fatal_error(), library_unexpected_error(), listener_bind(), listener_startclients(), load_configuration(), loadconfig(), log_invalid(), ns_add_reserved_dispatch(), ns_control_docommand(), ns_controls_configure(), ns_geoip_load(), ns_lwdclient_recv(), ns_lwdclient_stateidle(), ns_lwdmanager_create(), ns_lwresd_parseeresolvconf(), ns_main_earlyfatal(), ns_main_earlywarning(), ns_server_changezone(), ns_server_delzone(), ns_server_dumpdb(), ns_server_dumprecursing(), ns_server_dumpsecroots(), ns_server_dumpstats(), ns_server_flushcache(), ns_server_flushnode(), ns_server_freeze(), ns_server_loadnta(), ns_server_nta(), ns_server_reload(), ns_server_saventa(), ns_server_scan_interfaces(), ns_server_setdebuglevel(), ns_server_sync(), ns_server_togglequerylog(), ns_statschannels_configure(), ns_zone_configure(), nzf_remove(), opcodestat_dump(), rdatasetstats_dump(), rdtypestat_dump(), reconfig(), reload(), set_limit(), setup(), shutdown_listener(), shutdown_server(), update_listener(), and view_loaded().

#define NS_LOGMODULE_MAIN   (&ns_g_modules[0])

Definition at line 46 of file log.h.

Referenced by assertion_failed(), cleanup(), dump_symboltable(), library_fatal_error(), library_unexpected_error(), ns_main_earlyfatal(), ns_main_earlywarning(), and setup().

#define NS_LOGMODULE_CLIENT   (&ns_g_modules[1])

Definition at line 47 of file log.h.

Referenced by client_newconn(), client_request(), client_senddone(), ns_client_attach(), ns_client_checkacl(), ns_client_detach(), ns_client_dumpmessage(), ns_client_error(), ns_client_next(), ns_client_settimeout(), and process_ecs().

#define NS_LOGMODULE_SERVER   (&ns_g_modules[2])

Definition at line 48 of file log.h.

Referenced by add_keydata_zone(), add_listener(), adjust_interfaces(), category_fromconf(), check_lockfile(), client_ok(), configure_staticstub(), configure_view(), configure_view_dnsseckeys(), configure_zone(), configure_zone_ssutable(), create_empty_zone(), create_managers(), dns64_reverse(), do_addzone(), do_modzone(), dump_counters(), dumpdone(), fatal(), generate_salt(), generate_session_key(), get_view_querysource_dispatch(), load_configuration(), loadconfig(), ns_add_reserved_dispatch(), ns_geoip_load(), ns_server_changezone(), ns_server_delzone(), ns_server_dumpdb(), ns_server_dumprecursing(), ns_server_dumpsecroots(), ns_server_dumpstats(), ns_server_flushcache(), ns_server_flushnode(), ns_server_freeze(), ns_server_loadnta(), ns_server_nta(), ns_server_reload(), ns_server_saventa(), ns_server_scan_interfaces(), ns_server_setdebuglevel(), ns_server_sync(), ns_server_togglequerylog(), ns_statschannels_configure(), ns_zone_configure(), nzf_remove(), opcodestat_dump(), rdatasetstats_dump(), rdtypestat_dump(), reconfig(), reload(), set_limit(), shutdown_listener(), shutdown_server(), and view_loaded().

#define NS_LOGMODULE_QUERY   (&ns_g_modules[3])

Definition at line 49 of file log.h.

Referenced by log_query(), log_queryerror(), query_find(), query_findclosestnsec3(), query_getcachedb(), query_recurse(), query_resume(), query_validatezonedb(), rpz_getdb(), rpz_log_fail(), rpz_log_rewrite(), and warn_rfc1918().

#define NS_LOGMODULE_INTERFACEMGR   (&ns_g_modules[4])

Definition at line 50 of file log.h.

#define NS_LOGMODULE_UPDATE   (&ns_g_modules[5])

Definition at line 51 of file log.h.

Referenced by checkqueryacl(), checkupdateacl(), respond(), send_forward_event(), and update_log().

#define NS_LOGMODULE_XFER_IN   (&ns_g_modules[6])

Definition at line 52 of file log.h.

#define NS_LOGMODULE_XFER_OUT   (&ns_g_modules[7])

Definition at line 53 of file log.h.

Referenced by ns_xfr_start(), and xfrout_logv().

#define NS_LOGMODULE_NOTIFY   (&ns_g_modules[8])

Definition at line 54 of file log.h.

Referenced by notify_log().

#define NS_LOGMODULE_CONTROL   (&ns_g_modules[9])

Definition at line 55 of file log.h.

Referenced by add_listener(), control_newconn(), control_senddone(), get_rndckey(), log_invalid(), ns_control_docommand(), ns_controls_configure(), shutdown_listener(), and update_listener().

#define NS_LOGMODULE_LWRESD   (&ns_g_modules[10])

Definition at line 56 of file log.h.

Referenced by configure_listener(), listener_bind(), listener_startclients(), ns_lwdclient_recv(), ns_lwdclient_stateidle(), ns_lwdmanager_create(), ns_lwresd_configure(), and ns_lwresd_parseeresolvconf().


Function Documentation

isc_result_t ns_log_init ( isc_boolean_t  safe  ) 

Definition at line 71 of file log.c.

References cfg_log_init(), cleanup(), dns_log_init(), dns_log_setcontext(), isc_log_create(), isc_log_destroy(), isc_log_registercategories(), isc_log_registermodules(), isc_log_setcontext(), ISC_R_SUCCESS, ns_log_setdefaultcategory(), ns_log_setdefaultchannels(), and ns_log_setsafechannels().

Referenced by setup().

isc_result_t ns_log_setdefaultchannels ( isc_logconfig_t lcfg  ) 

Initialize the logging system and set up an initial default logging default configuration that will be used until the config file has been read.

If 'safe' is true, use a default configuration that refrains from opening files. This is to avoid creating log files as root.

Definition at line 117 of file log.c.

References cleanup(), isc_logdestination::facility, isc_logdestination::file, ISC_FACILITY, isc_log_createchannel(), ISC_LOG_DEBUGONLY, ISC_LOG_DYNAMIC, ISC_LOG_INFO, ISC_LOG_PRINTCATEGORY, ISC_LOG_PRINTLEVEL, ISC_LOG_PRINTTIME, ISC_LOG_ROLLNEVER, isc_log_setdebuglevel(), ISC_LOG_TOFILE, ISC_LOG_TOSYSLOG, ISC_R_SUCCESS, isc_logfile::maximum_size, isc_logfile::name, isc_logfile::stream, and isc_logfile::versions.

Referenced by load_configuration(), ns_log_configure(), and ns_log_init().

isc_result_t ns_log_setsafechannels ( isc_logconfig_t lcfg  ) 

Set up logging channels according to the named defaults, which may differ from the logging library defaults. Currently, this just means setting up default_debug.

Definition at line 178 of file log.c.

References cleanup(), isc_logdestination::facility, isc_logdestination::file, ISC_FACILITY, isc_log_createchannel(), ISC_LOG_DYNAMIC, ISC_LOG_INFO, ISC_LOG_PRINTCATEGORY, ISC_LOG_PRINTLEVEL, ISC_LOG_PRINTTIME, ISC_LOG_ROLLNEVER, isc_log_setdebuglevel(), ISC_LOG_TOFILE, ISC_LOG_TONULL, ISC_LOG_TOSYSLOG, ISC_R_SUCCESS, isc_logfile::maximum_size, isc_logfile::name, isc_logfile::stream, and isc_logfile::versions.

Referenced by ns_log_init().

isc_result_t ns_log_setdefaultcategory ( isc_logconfig_t lcfg  ) 

Like ns_log_setdefaultchannels(), but omits any logging to files.

Definition at line 231 of file log.c.

References cleanup(), isc_log_usechannel(), ISC_LOGCATEGORY_DEFAULT, and ISC_R_SUCCESS.

Referenced by load_configuration(), ns_log_configure(), and ns_log_init().

isc_result_t ns_log_setunmatchedcategory ( isc_logconfig_t lcfg  ) 

Set up "category default" to go to the right places.

Definition at line 255 of file log.c.

References isc_log_usechannel(), and NS_LOGCATEGORY_UNMATCHED.

Referenced by load_configuration(), and ns_log_configure().

void ns_log_shutdown ( void   ) 

Set up "category unmatched" to go to the right places.

Definition at line 264 of file log.c.

References dns_log_setcontext(), isc_log_destroy(), and isc_log_setcontext().

Referenced by cleanup().


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