#include <stdio.h>
#include <stdarg.h>
#include <syslog.h>
#include <isc/formatcheck.h>
#include <isc/lang.h>
#include <isc/platform.h>
#include <isc/types.h>
Go to the source code of this file.
Data Structures | |
struct | isc_logcategory |
Used to name the categories used by a library. More... | |
struct | isc_logmodule |
Similar to isc_logcategory, but for all the modules a library defines. More... | |
struct | isc_logfile |
The isc_logfile structure is initialized as part of an isc_logdestination before calling isc_log_createchannel(). More... | |
union | isc_logdestination |
Passed to isc_log_createchannel to define the attributes of either a stdio or a syslog log. More... | |
Defines | |
#define | ISC_LOG_H 1 |
#define | ISC_LOGMODULE_SOCKET (&isc_modules[0]) |
#define | ISC_LOGMODULE_TIME (&isc_modules[1]) |
#define | ISC_LOGMODULE_INTERFACE (&isc_modules[2]) |
#define | ISC_LOGMODULE_TIMER (&isc_modules[3]) |
#define | ISC_LOGMODULE_FILE (&isc_modules[4]) |
#define | ISC_LOGMODULE_OTHER (&isc_modules[5]) |
#define | ISC_LOG_DEBUG(level) (level) |
Severity levels, patterned after Unix's syslog levels. | |
#define | ISC_LOG_DYNAMIC 0 |
#define | ISC_LOG_INFO (-1) |
Severity levels, patterned after Unix's syslog levels. | |
#define | ISC_LOG_NOTICE (-2) |
Severity levels, patterned after Unix's syslog levels. | |
#define | ISC_LOG_WARNING (-3) |
Severity levels, patterned after Unix's syslog levels. | |
#define | ISC_LOG_ERROR (-4) |
Severity levels, patterned after Unix's syslog levels. | |
#define | ISC_LOG_CRITICAL (-5) |
Severity levels, patterned after Unix's syslog levels. | |
#define | ISC_LOG_TONULL 1 |
Destinations. | |
#define | ISC_LOG_TOSYSLOG 2 |
Destinations. | |
#define | ISC_LOG_TOFILE 3 |
Destinations. | |
#define | ISC_LOG_TOFILEDESC 4 |
Destinations. | |
#define | ISC_LOG_PRINTTIME 0x0001 |
Channel flags. | |
#define | ISC_LOG_PRINTLEVEL 0x0002 |
Channel flags. | |
#define | ISC_LOG_PRINTCATEGORY 0x0004 |
Channel flags. | |
#define | ISC_LOG_PRINTMODULE 0x0008 |
Channel flags. | |
#define | ISC_LOG_PRINTTAG 0x0010 |
Channel flags. | |
#define | ISC_LOG_PRINTPREFIX 0x0020 |
Channel flags. | |
#define | ISC_LOG_PRINTALL 0x003F |
Channel flags. | |
#define | ISC_LOG_BUFFERED 0x0040 |
Channel flags. | |
#define | ISC_LOG_DEBUGONLY 0x1000 |
Channel flags. | |
#define | ISC_LOG_OPENERR 0x8000 |
Channel flags. | |
#define | ISC_LOG_ROLLINFINITE (-1) |
Other options. | |
#define | ISC_LOG_ROLLNEVER (-2) |
Other options. | |
#define | ISC_LOGCATEGORY_DEFAULT (&isc_categories[0]) |
Do not log directly to DEFAULT. Use another category. When in doubt, use GENERAL. | |
#define | ISC_LOGCATEGORY_GENERAL (&isc_categories[1]) |
Do not log directly to DEFAULT. Use another category. When in doubt, use GENERAL. | |
Typedefs | |
typedef struct isc_logfile | isc_logfile_t |
typedef union isc_logdestination | isc_logdestination_t |
Functions | |
ISC_LANG_BEGINDECLS isc_result_t | isc_log_create (isc_mem_t *mctx, isc_log_t **lctxp, isc_logconfig_t **lcfgp) |
Establish a new logging context, with default channels. | |
isc_result_t | isc_logconfig_create (isc_log_t *lctx, isc_logconfig_t **lcfgp) |
Create the data structure that holds all of the configurable information about where messages are actually supposed to be sent -- the information that could changed based on some configuration file, as opposed to the the category/module specification of isc_log_[v]write[1] that is compiled into a program, or the debug_level which is dynamic state information. | |
isc_logconfig_t * | isc_logconfig_get (isc_log_t *lctx) |
Returns a pointer to the configuration currently in use by the log context. | |
isc_result_t | isc_logconfig_use (isc_log_t *lctx, isc_logconfig_t *lcfg) |
Associate a new configuration with a logging context. | |
void | isc_log_destroy (isc_log_t **lctxp) |
Deallocate the memory associated with a logging context. | |
void | isc_logconfig_destroy (isc_logconfig_t **lcfgp) |
Destroy a logging configuration. | |
void | isc_log_registercategories (isc_log_t *lctx, isc_logcategory_t categories[]) |
Identify logging categories a library will use. | |
void | isc_log_registermodules (isc_log_t *lctx, isc_logmodule_t modules[]) |
Identify logging categories a library will use. | |
isc_result_t | isc_log_createchannel (isc_logconfig_t *lcfg, const char *name, unsigned int type, int level, const isc_logdestination_t *destination, unsigned int flags) |
Specify the parameters of a logging channel. | |
isc_result_t | isc_log_usechannel (isc_logconfig_t *lcfg, const char *name, const isc_logcategory_t *category, const isc_logmodule_t *module) |
Associate a named logging channel with a category and module that will use it. | |
void | isc_log_write (isc_log_t *lctx, isc_logcategory_t *category, isc_logmodule_t *module, int level, const char *format,...) ISC_FORMAT_PRINTF(5 |
Write a message to the log channels. | |
void void | isc_log_vwrite (isc_log_t *lctx, isc_logcategory_t *category, isc_logmodule_t *module, int level, const char *format, va_list args) ISC_FORMAT_PRINTF(5 |
Write a message to the log channels. | |
void void void | isc_log_write1 (isc_log_t *lctx, isc_logcategory_t *category, isc_logmodule_t *module, int level, const char *format,...) ISC_FORMAT_PRINTF(5 |
Write a message to the log channels, pruning duplicates that occur within a configurable amount of seconds (see isc_log_[sg]etduplicateinterval). This function is otherwise identical to isc_log_write(). | |
void void void void | isc_log_vwrite1 (isc_log_t *lctx, isc_logcategory_t *category, isc_logmodule_t *module, int level, const char *format, va_list args) ISC_FORMAT_PRINTF(5 |
Write a message to the log channels, pruning duplicates that occur within a configurable amount of seconds (see isc_log_[sg]etduplicateinterval). This function is otherwise identical to isc_log_vwrite(). | |
void void void void void void void void void | isc_log_setdebuglevel (isc_log_t *lctx, unsigned int level) |
Set the debugging level used for logging. | |
unsigned int | isc_log_getdebuglevel (isc_log_t *lctx) |
Get the current debugging level. | |
isc_boolean_t | isc_log_wouldlog (isc_log_t *lctx, int level) |
Determine whether logging something to 'lctx' at 'level' would actually cause something to be logged somewhere. | |
void | isc_log_setduplicateinterval (isc_logconfig_t *lcfg, unsigned int interval) |
Set the interval over which duplicate log messages will be ignored by isc_log_[v]write1(), in seconds. | |
unsigned int | isc_log_getduplicateinterval (isc_logconfig_t *lcfg) |
Get the current duplicate filtering interval. | |
isc_result_t | isc_log_settag (isc_logconfig_t *lcfg, const char *tag) |
Set the program name or other identifier for ISC_LOG_PRINTTAG. | |
char * | isc_log_gettag (isc_logconfig_t *lcfg) |
Get the current identifier printed with ISC_LOG_PRINTTAG. | |
void | isc_log_opensyslog (const char *tag, int options, int facility) |
Initialize syslog logging. | |
void | isc_log_closefilelogs (isc_log_t *lctx) |
Close all open files used by ISC_LOG_TOFILE channels. | |
isc_logcategory_t * | isc_log_categorybyname (isc_log_t *lctx, const char *name) |
Find a category by its name. | |
isc_logmodule_t * | isc_log_modulebyname (isc_log_t *lctx, const char *name) |
Find a module by its name. | |
void | isc_log_setcontext (isc_log_t *lctx) |
Sets the context used by the libisc for logging. | |
void void void void void | isc_log_iwrite (isc_log_t *lctx, isc_logcategory_t *category, isc_logmodule_t *module, int level, isc_msgcat_t *msgcat, int msgset, int message, const char *format,...) ISC_FORMAT_PRINTF(8 |
These are four internationalized versions of the isc_log_[v]write[1] functions. | |
void void void void void void | isc_log_ivwrite (isc_log_t *lctx, isc_logcategory_t *category, isc_logmodule_t *module, int level, isc_msgcat_t *msgcat, int msgset, int message, const char *format, va_list args) ISC_FORMAT_PRINTF(8 |
These are four internationalized versions of the isc_log_[v]write[1] functions. | |
void void void void void void void | isc_log_iwrite1 (isc_log_t *lctx, isc_logcategory_t *category, isc_logmodule_t *module, int level, isc_msgcat_t *msgcat, int msgset, int message, const char *format,...) ISC_FORMAT_PRINTF(8 |
These are four internationalized versions of the isc_log_[v]write[1] functions. | |
void void void void void void void void | isc_log_ivwrite1 (isc_log_t *lctx, isc_logcategory_t *category, isc_logmodule_t *module, int level, isc_msgcat_t *msgcat, int msgset, int message, const char *format, va_list args) ISC_FORMAT_PRINTF(8 |
These are four internationalized versions of the isc_log_[v]write[1] functions. | |
Variables | |
LIBISC_EXTERNAL_DATA isc_logcategory_t | isc_categories [] |
The built-in categories of libisc. | |
LIBISC_EXTERNAL_DATA isc_log_t * | isc_lctx |
LIBISC_EXTERNAL_DATA isc_logmodule_t | isc_modules [] |
Definition in file log.h.
#define ISC_LOG_DEBUG | ( | level | ) | (level) |
Severity levels, patterned after Unix's syslog levels.
Definition at line 39 of file log.h.
Referenced by acache_cleaning_timer_action(), acache_incremental_cleaning_action(), acache_overmem_cleaning_action(), add_nsec3param_records(), add_soa(), adjust_quantum(), authvalidated(), begin_cleaning(), check_deadlock(), check_lockfile(), checkupdateacl(), checkwildcard(), clean_finds_at_name(), cleaning_timer_action(), client_newconn(), client_request(), cnamevalidated(), configure_view(), create_fetch(), create_tcp_dispatch(), create_validator(), decrement_reference(), detachnode(), dlv_validatezonekey(), dlv_validator_start(), dlvfetched(), dlvvalidated(), dns_diff_print(), dns_dlzcreate(), dns_dlzdestroy(), dns_dlzregister(), dns_dlzunregister(), dns_dnssec_verify3(), dns_message_parse(), dns_nsec3_noexistnodata(), dns_nsec_noexistnodata(), dns_request_cancel(), dns_request_createraw4(), dns_request_createvia4(), dns_request_destroy(), dns_request_getresponse(), dns_requestmgr_attach(), dns_requestmgr_create(), dns_requestmgr_detach(), dns_requestmgr_shutdown(), dns_requestmgr_whenshutdown(), dns_sdlzcreate(), dns_sdlzdestroy(), dns_sdlzregister(), dns_sdlzunregister(), dns_update_signaturesinc(), dns_validator_cancel(), dns_validator_destroy(), do_scan(), dsfetched(), dsfetched2(), dsvalidated(), dump_done(), dump_symboltable(), dumptostreaminc(), end_cleaning(), expirenode(), fctx_getaddresses(), fctx_try(), fetch_callback_validator(), finddlvsep(), findnsec3proofs(), flush_deletions(), forward_callback(), free_rbtdb(), freezezones(), get_edns_expire(), get_key(), got_transfer_quota(), gss_log(), incremental_cleaning_action(), isblackholed(), journal_open(), keyfetch_done(), keyfromds(), keyvalidated(), listener_startclients(), load_configuration(), log_fetch(), log_ns_ttl(), markanswer(), maybe_free_rbtdb(), mgr_destroy(), mgr_gethash(), notify_done(), notify_send_toaddr(), ns_client_attach(), ns_client_checkacl(), ns_client_detach(), ns_client_dumpmessage(), ns_client_error(), ns_client_next(), ns_control_docommand(), ns_controls_configure(), ns_lwdclient_log(), ns_query_start(), ns_server_scan_interfaces(), ns_statschannels_configure(), ns_xfr_start(), ns_zone_reusable(), nsecvalidate(), overmem_cleaning_action(), possibly_mark(), process_ecs(), process_opt(), proveunsecure(), query_addadditional(), query_addadditional2(), query_addbestns(), query_addds(), query_addnoqnameproof(), query_addns(), query_addrdataset(), query_addrrset(), query_addsoa(), query_addwildcardproof(), query_dns64(), query_error(), query_filter64(), query_find(), query_findclosestnsec3(), query_getcachedb(), query_getnamebuf(), query_isduplicate(), query_keepname(), query_newname(), query_newnamebuf(), query_newrdataset(), query_putrdataset(), query_releasename(), query_resume(), query_validatezonedb(), redirect(), redirect2(), refresh_callback(), req_cancel(), req_connected(), req_destroy(), req_render(), req_response(), req_send(), req_senddone(), req_sendevent(), req_timeout(), requestmgr_attach(), requestmgr_detach(), resquery_response(), resquery_send(), revocable(), save_nsec3param(), sdlz_log(), send_shutdown_events(), sendstream(), set_limit(), set_refreshkeytimer(), setup_logging(), ssu_e_log(), startfinddlvsep(), stub_callback(), sync_keyzone(), tkey_log(), trim_ns_ttl(), try_dscp_v4(), validate(), validatezonekey(), validator_logcreate(), validator_start(), verify(), view_find(), water(), xfr_rr(), xfrin_recv_done(), xfrin_send_done(), xfrin_send_request(), zmgr_resume_xfrs(), zone_debuglog(), zone_load(), zone_nsec3chain(), zone_postload(), zone_refreshkeys(), zone_replacedb(), and zone_xfrdone().
#define ISC_LOG_DYNAMIC 0 |
ISC_LOG_DYNAMIC can only be used for defining channels with isc_log_createchannel(), not to specify a level in isc_log_write().
Definition at line 44 of file log.h.
Referenced by assignchannel(), channel_fromconf(), dns_test_begin(), isc_log_doit(), isc_logconfig_create(), isc_test_begin(), ns_log_setdefaultchannels(), ns_log_setsafechannels(), and setup_logging().
#define ISC_LOG_INFO (-1) |
Severity levels, patterned after Unix's syslog levels.
Definition at line 45 of file log.h.
Referenced by add_bad(), add_keydata_zone(), channel_fromconf(), checkqueryacl(), checkupdateacl(), configure_view(), configure_view_dnsseckeys(), create_empty_zone(), create_managers(), decrement_reference(), dns64_reverse(), dns_dlz_ssumatch(), dns_dlzcreate(), dns_ntatable_covered(), dns_tsigkey_createfromkey(), dns_zone_notifyreceive(), do_addzone(), do_modzone(), do_scan(), dumpdone(), findname(), forward_callback(), generate_salt(), generate_session_key(), get_rndckey(), get_view_querysource_dispatch(), got_transfer_quota(), grow_entries(), grow_names(), internal_current4(), isc_logconfig_create(), load_configuration(), loadconfig(), log_edns(), log_lame(), log_query(), main(), maybe_free(), ns_control_docommand(), ns_geoip_load(), ns_log_setdefaultchannels(), ns_log_setsafechannels(), ns_notify_start(), ns_query(), 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_nta(), ns_server_reload(), ns_server_setdebuglevel(), ns_server_sync(), ns_server_togglequerylog(), ns_xfr_start(), purge_old_interfaces(), query_error(), query_getcachedb(), query_validatezonedb(), queue_xfrin(), receive_secure_serial(), reconfig(), refresh_callback(), reload(), removed(), setup_logging(), shutdown_server(), stub_callback(), tcp_recv(), validate(), validatezonekey(), validator_start(), verify(), view_find(), writeheader(), xfrin_connect_done(), xfrin_reset(), xfrout_senddone(), zmgr_start_xfrin_ifquota(), zone_addnsec3chain(), zone_load(), zone_notify(), zone_postload(), and zone_xfrdone().
#define ISC_LOG_NOTICE (-2) |
Severity levels, patterned after Unix's syslog levels.
Definition at line 46 of file log.h.
Referenced by add_listener(), cache_name(), channel_fromconf(), cleanup(), configure_listener(), dns_acache_setcleaninginterval(), dns_zone_addnsec3chain(), dns_zone_notifyreceive(), end_cleaning(), fctx_sendevents(), is_answeraddress_allowed(), is_answertarget_allowed(), log_formerr(), ns_lwresd_configure(), ns_notify_start(), resquery_response(), set_key_expiry_warning(), setup(), shutdown_listener(), spillattimer_countdown(), validatezonekey(), and view_loaded().
#define ISC_LOG_WARNING (-3) |
Severity levels, patterned after Unix's syslog levels.
Definition at line 47 of file log.h.
Referenced by add_listener(), adjust_interfaces(), begin_cleaning(), bind9_check_controls(), bind9_check_key(), cfg_acl_fromconfig2(), channel_fromconf(), check_filteraaaa(), check_lockfile(), check_mx(), check_nsec3param(), check_options(), check_orderent(), check_recursionacls(), check_trusted_key(), check_viewconf(), check_zoneconf(), checkmx(), checkns(), checksrv(), client_newconn(), client_ok(), client_request(), client_senddone(), configure_forward(), configure_listener(), configure_view(), configure_zone(), control_newconn(), control_senddone(), convert_keyname(), convert_named_acl(), del_sigs(), delete_node(), diff_apply(), directory_callback(), dlv_validatezonekey(), dns_acache_setcleaninginterval(), dns_cache_detach(), dns_cache_setcleaninginterval(), dns_diff_load(), dns_dlz_writeablezone(), dns_dnssec_findmatchingkeys(), dns_dnssec_findzonekeys2(), dns_dnssec_keylistfromrdataset(), dns_root_checkhints(), dns_rootns_create(), dns_zone_refresh(), do_scan(), dsfetched2(), dst__privstruct_writefile(), dstkey_fromconfig(), dsvalidated(), finddlvsep(), forward_callback(), get_dispsocket(), get_rndckey(), integrity_checks(), isclog_warn_callback(), keyfetch_done(), listener_bind(), load_configuration(), loadnode(), ns_add_reserved_dispatch(), ns_control_docommand(), ns_interfacemgr_scan0(), ns_lwdmanager_create(), ns_main_earlywarning(), ns_statschannels_configure(), ns_xfr_start(), ns_zone_configure(), nzf_remove(), parser_complain(), proveunsecure(), query_find(), query_findclosestnsec3(), query_recurse(), register_keys(), report(), schedule(), sendstream(), set_key_expiry_warning(), set_limit(), setup_locals(), setup_logging(), startfinddlvsep(), update_action(), update_listener(), validatezonekey(), warn_rfc1918(), zone_check_dnskeys(), zone_check_glue(), zone_check_mx(), zone_check_ns(), zone_check_srv(), zone_expire(), zone_maintenance(), zone_postload(), zone_refreshkeys(), zone_replacedb(), zone_rrset_check_dup(), and zone_saveunique().
#define ISC_LOG_ERROR (-4) |
Severity levels, patterned after Unix's syslog levels.
Definition at line 48 of file log.h.
Referenced by add_initial_keys(), add_sigs(), add_soa(), bind9_check_controls(), bind9_check_controlskeys(), bind9_check_key(), bind9_check_logging(), bind9_check_namedconf(), category_fromconf(), channel_fromconf(), check_dns64(), check_dnssec(), check_dscp(), check_dual_stack(), check_forward(), check_keylist(), check_lockfile(), check_mx(), check_nonzero(), check_nsec3param(), check_options(), check_orderent(), check_servers(), check_trusted_key(), check_ttls(), check_update_policy(), check_zoneconf(), checkmx(), checkns(), checkqueryacl(), checksrv(), checkupdateacl(), client_request(), closeandrename(), closeversion(), configure_alternates(), configure_forward(), configure_session_key(), configure_staticstub(), configure_staticstub_serveraddrs(), configure_staticstub_servernames(), configure_view(), configure_view_dnsseckeys(), configure_view_nametable(), configure_zone(), configure_zone_ssutable(), convert_named_acl(), del_sigs(), directory_callback(), disable_algorithms(), disable_ds_digests(), disabled_algorithms(), disabled_ds_digests(), dns_db_create(), dns_dlzcreate(), dns_journal_commit(), dns_journal_print(), dns_master_dumpnode(), dns_rootns_create(), dns_sdlzcreate(), dns_update_signaturesinc(), dns_xfrin_create3(), dns_zone_refresh(), dnskey_sane(), do_scan(), dstkey_fromconfig(), dump_counters(), dump_done(), dumpdone(), fileexist(), flushandsync(), freezezones(), generate_session_key(), get_udpsocket(), get_view_querysource_dispatch(), getoriginnode(), got_transfer_quota(), internal_accept(), isc_file_openuniquemode(), isclog_error_callback(), ixfr_init(), journal_file_create(), journal_fsync(), journal_next(), journal_open(), journal_read(), journal_seek(), journal_write(), keydone(), library_unexpected_error(), listener_startclients(), load_configuration(), load_secroots(), loadconfig(), log_invalid(), mustbesecure(), nameexist(), newversion(), next_active(), notify_send_toaddr(), ns_client_settimeout(), ns_config_getclass(), ns_config_getdscp(), ns_config_getipandkeylist(), ns_config_getiplist(), ns_config_getport(), ns_config_gettype(), ns_interface_accepttcp(), ns_interface_create(), ns_interface_listenudp(), ns_listenelt_fromconfig(), ns_lwdclient_recv(), ns_lwdclient_stateidle(), ns_lwresd_parseeresolvconf(), ns_query(), ns_server_dumprecursing(), ns_server_dumpsecroots(), ns_server_dumpstats(), ns_server_flushcache(), ns_server_flushnode(), ns_server_loadnta(), ns_server_nta(), ns_server_saventa(), ns_xfr_start(), ns_zone_configure(), opcodestat_dump(), opentmp(), parser_complain(), previous_closest_nsec(), query_addns(), query_addsoa(), query_find(), query_resume(), query_validatezonedb(), queue_xfrin(), rdatasetstats_dump(), rdtypestat_dump(), read_one_rr(), receive_secure_db(), receive_secure_serial(), reconfig(), reload(), respond(), resquery_response(), resume_addnsec3chain(), resume_signingwithkey(), roll_forward(), rpz_find_p(), rpz_ready(), rpz_rewrite(), rpz_rewrite_ip_rrset(), rpz_rrset_find(), set_key_expiry_warning(), setmodtime(), soa_query(), sync_keyzone(), sync_secure_journal(), tcp_recv(), try_proto(), udp_recv(), update_action(), update_sigs(), validate_masters(), wakeup_socket(), xfr_rr(), xfrin_fail(), xfrout_fail(), zone_check_glue(), zone_check_mx(), zone_check_ns(), zone_check_srv(), zone_journal(), zone_load(), zone_nsec3chain(), zone_postload(), zone_replacedb(), zone_resigninc(), zone_rrset_check_dup(), zone_settimer(), zone_sign(), and zone_xfrdone().
#define ISC_LOG_CRITICAL (-5) |
Severity levels, patterned after Unix's syslog levels.
Definition at line 49 of file log.h.
Referenced by assertion_failed(), channel_fromconf(), fatal(), isc_log_createchannel(), isc_log_doit(), library_fatal_error(), and ns_main_earlyfatal().
#define ISC_LOG_TONULL 1 |
Destinations.
Definition at line 56 of file log.h.
Referenced by assignchannel(), channel_fromconf(), isc_log_createchannel(), isc_log_doit(), isc_logconfig_create(), and ns_log_setsafechannels().
#define ISC_LOG_TOSYSLOG 2 |
Destinations.
Definition at line 57 of file log.h.
Referenced by channel_fromconf(), isc_log_createchannel(), isc_log_doit(), isc_logconfig_create(), ns_log_setdefaultchannels(), and ns_log_setsafechannels().
#define ISC_LOG_TOFILE 3 |
Destinations.
Definition at line 58 of file log.h.
Referenced by channel_fromconf(), greatest_version(), isc_log_closefilelogs(), isc_log_createchannel(), isc_log_doit(), isc_log_open(), isc_log_setdebuglevel(), isc_logconfig_destroy(), ns_log_setdefaultchannels(), and ns_log_setsafechannels().
#define ISC_LOG_TOFILEDESC 4 |
Destinations.
Definition at line 59 of file log.h.
Referenced by channel_fromconf(), dns_test_begin(), isc_log_createchannel(), isc_log_doit(), isc_logconfig_create(), isc_test_begin(), main(), and setup_logging().
#define ISC_LOG_PRINTTIME 0x0001 |
Channel flags.
Definition at line 66 of file log.h.
Referenced by channel_fromconf(), isc_log_doit(), isc_logconfig_create(), ns_log_setdefaultchannels(), and ns_log_setsafechannels().
#define ISC_LOG_PRINTLEVEL 0x0002 |
Channel flags.
Definition at line 67 of file log.h.
Referenced by channel_fromconf(), isc_log_doit(), main(), ns_log_setdefaultchannels(), ns_log_setsafechannels(), and setup_logging().
#define ISC_LOG_PRINTCATEGORY 0x0004 |
Channel flags.
Definition at line 68 of file log.h.
Referenced by channel_fromconf(), isc_log_doit(), ns_log_setdefaultchannels(), and ns_log_setsafechannels().
#define ISC_LOG_PRINTMODULE 0x0008 |
#define ISC_LOG_PRINTTAG 0x0010 |
Channel flags.
Definition at line 70 of file log.h.
Referenced by isc_log_doit(), main(), and setup_logging().
#define ISC_LOG_PRINTPREFIX 0x0020 |
#define ISC_LOG_PRINTALL 0x003F |
#define ISC_LOG_BUFFERED 0x0040 |
Channel flags.
Definition at line 73 of file log.h.
Referenced by channel_fromconf(), isc_log_createchannel(), and isc_log_doit().
#define ISC_LOG_DEBUGONLY 0x1000 |
Channel flags.
Definition at line 74 of file log.h.
Referenced by isc_log_createchannel(), isc_log_doit(), isc_log_setdebuglevel(), and ns_log_setdefaultchannels().
#define ISC_LOG_OPENERR 0x8000 |
Channel flags.
Definition at line 75 of file log.h.
Referenced by isc_log_doit(), and isc_log_open().
#define ISC_LOG_ROLLINFINITE (-1) |
Other options.
XXXDCL INFINITE doesn't yet work. Arguably it isn't needed, but since I am intend to make large number of versions work efficiently, INFINITE is going to be trivial to add to that.
Definition at line 86 of file log.h.
Referenced by channel_fromconf(), and roll_log().
#define ISC_LOG_ROLLNEVER (-2) |
Other options.
XXXDCL INFINITE doesn't yet work. Arguably it isn't needed, but since I am intend to make large number of versions work efficiently, INFINITE is going to be trivial to add to that.
Definition at line 87 of file log.h.
Referenced by channel_fromconf(), dns_test_begin(), isc_log_createchannel(), isc_log_doit(), isc_log_open(), isc_logconfig_create(), isc_test_begin(), main(), ns_log_setdefaultchannels(), ns_log_setsafechannels(), roll_log(), and setup_logging().
#define ISC_LOGCATEGORY_DEFAULT (&isc_categories[0]) |
Do not log directly to DEFAULT. Use another category. When in doubt, use GENERAL.
Definition at line 163 of file log.h.
Referenced by ns_log_setdefaultcategory().
#define ISC_LOGCATEGORY_GENERAL (&isc_categories[1]) |
Do not log directly to DEFAULT. Use another category. When in doubt, use GENERAL.
Definition at line 164 of file log.h.
Referenced by closeandrename(), configure_listener(), dns_master_dumpnode(), dns_message_parse(), dumptostreaminc(), flushandsync(), internal_accept(), internal_current4(), isc_file_openuniquemode(), ns_lwresd_configure(), opentmp(), schedule(), try_dscp_v4(), try_proto(), wakeup_socket(), and writeheader().
#define ISC_LOGMODULE_SOCKET (&isc_modules[0]) |
Definition at line 167 of file log.h.
Referenced by internal_accept(), try_dscp_v4(), try_proto(), and wakeup_socket().
#define ISC_LOGMODULE_TIME (&isc_modules[1]) |
#define ISC_LOGMODULE_INTERFACE (&isc_modules[2]) |
#define ISC_LOGMODULE_TIMER (&isc_modules[3]) |
#define ISC_LOGMODULE_FILE (&isc_modules[4]) |
#define ISC_LOGMODULE_OTHER (&isc_modules[5]) |
typedef struct isc_logfile isc_logfile_t |
typedef union isc_logdestination isc_logdestination_t |
ISC_LANG_BEGINDECLS isc_result_t isc_log_create | ( | isc_mem_t * | mctx, | |
isc_log_t ** | lctxp, | |||
isc_logconfig_t ** | lcfgp | |||
) |
Establish a new logging context, with default channels.
Notes:
Definition at line 268 of file log.c.
References isc_log::categories, isc_log::category_count, isc_log::debug_level, ISC_LIST_INIT, isc_log_destroy(), isc_log_registercategories(), isc_log_registermodules(), isc_logconfig_create(), isc_logconfig_destroy(), isc_mem_attach(), isc_mem_get, isc_mem_putanddetach, isc_mutex_init, ISC_R_NOMEMORY, ISC_R_SUCCESS, LCTX_MAGIC, isc_log::lock, isc_log::logconfig, isc_log::magic, isc_log::mctx, isc_log::module_count, isc_log::modules, REQUIRE, and sync_channellist().
Referenced by dns_client_create(), dns_test_begin(), isc_test_begin(), main(), ns_log_init(), setup_libs(), setup_logging(), and setup_system().
isc_result_t isc_logconfig_create | ( | isc_log_t * | lctx, | |
isc_logconfig_t ** | lcfgp | |||
) |
Create the data structure that holds all of the configurable information about where messages are actually supposed to be sent -- the information that could changed based on some configuration file, as opposed to the the category/module specification of isc_log_[v]write[1] that is compiled into a program, or the debug_level which is dynamic state information.
Notes:
* default_syslog * - log to syslog's daemon facility #ISC_LOG_INFO or higher * default_stderr * - log to stderr #ISC_LOG_INFO or higher * default_debug * - log to stderr #ISC_LOG_DEBUG dynamically * null * - log nothing *
Definition at line 332 of file log.c.
References isc_logchannellist::channel, isc_logchannel::destination, isc_logdestination::facility, isc_logdestination::file, ISC_FALSE, ISC_LIST_HEAD, ISC_LIST_INIT, isc_log_createchannel(), ISC_LOG_DYNAMIC, ISC_LOG_INFO, ISC_LOG_PRINTTIME, ISC_LOG_ROLLNEVER, ISC_LOG_TOFILEDESC, ISC_LOG_TONULL, ISC_LOG_TOSYSLOG, isc_logconfig_destroy(), isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, LCFG_MAGIC, isc_logconfig::lctx, isc_logchannel::level, isc_logconfig::magic, isc_logfile::maximum_size, isc_log::mctx, isc_logfile::name, REQUIRE, isc_logfile::stream, VALID_CONTEXT, and isc_logfile::versions.
Referenced by isc_log_create(), and load_configuration().
isc_logconfig_t* isc_logconfig_get | ( | isc_log_t * | lctx | ) |
Returns a pointer to the configuration currently in use by the log context.
Requires:
Definition at line 424 of file log.c.
References ENSURE, isc_log::logconfig, REQUIRE, and VALID_CONTEXT.
isc_result_t isc_logconfig_use | ( | isc_log_t * | lctx, | |
isc_logconfig_t * | lcfg | |||
) |
Associate a new configuration with a logging context.
Notes:
Definition at line 433 of file log.c.
References isc_logconfig_destroy(), ISC_R_SUCCESS, isc_logconfig::lctx, isc_log::lock, LOCK, isc_log::logconfig, REQUIRE, sync_channellist(), UNLOCK, VALID_CONFIG, and VALID_CONTEXT.
Referenced by load_configuration().
void isc_log_destroy | ( | isc_log_t ** | lctxp | ) |
Deallocate the memory associated with a logging context.
Requires:
Definition at line 463 of file log.c.
References isc_log::buffer, isc_log::categories, isc_log::category_count, isc_log::debug_level, DESTROYLOCK, ISC_LIST_HEAD, ISC_LIST_UNLINK, isc_logconfig_destroy(), isc_mem_put, isc_mem_putanddetach, isc_log::lock, isc_log::logconfig, isc_log::magic, isc_log::mctx, isc_log::module_count, isc_log::modules, REQUIRE, isc_logmessage::text, and VALID_CONTEXT.
Referenced by cleanup(), cleanup_logging(), destroy_libs(), dns_test_end(), isc_log_create(), isc_test_end(), main(), ns_log_init(), and ns_log_shutdown().
void isc_logconfig_destroy | ( | isc_logconfig_t ** | lcfgp | ) |
Destroy a logging configuration.
Notes:
Definition at line 504 of file log.c.
References DE_CONST, FILE_NAME, FILE_STREAM, ISC_FALSE, ISC_LIST, ISC_LIST_HEAD, ISC_LIST_UNLINK, ISC_LOG_TOFILE, isc_mem_free, isc_mem_put, isc_logconfig::lctx, isc_log::logconfig, isc_logconfig::magic, isc_log::mctx, isc_logchannel::name, REQUIRE, isc_logchannel::type, and VALID_CONFIG.
Referenced by isc_log_create(), isc_log_destroy(), isc_logconfig_create(), isc_logconfig_use(), and load_configuration().
void isc_log_registercategories | ( | isc_log_t * | lctx, | |
isc_logcategory_t | categories[] | |||
) |
Identify logging categories a library will use.
Notes:
Definition at line 570 of file log.c.
References isc_log::categories, isc_log::category_count, DE_CONST, isc_logcategory::id, isc_logcategory::name, isc_logchannel::name, REQUIRE, and VALID_CONTEXT.
Referenced by cfg_log_init(), dns_log_init(), dns_test_begin(), isc_log_create(), isc_test_begin(), ns_log_init(), and setup_logging().
void isc_log_registermodules | ( | isc_log_t * | lctx, | |
isc_logmodule_t | modules[] | |||
) |
Identify logging categories a library will use.
Notes:
Definition at line 637 of file log.c.
References DE_CONST, isc_logmodule::id, isc_log::module_count, isc_log::modules, isc_logmodule::name, isc_logchannel::name, REQUIRE, and VALID_CONTEXT.
Referenced by cfg_log_init(), dns_log_init(), isc_log_create(), and ns_log_init().
isc_result_t isc_log_createchannel | ( | isc_logconfig_t * | lcfg, | |
const char * | name, | |||
unsigned int | type, | |||
int | level, | |||
const isc_logdestination_t * | destination, | |||
unsigned int | flags | |||
) |
Specify the parameters of a logging channel.
Notes:
Requires:
Definition at line 704 of file log.c.
References isc_logchannellist::channel, isc_logdestination::facility, FACILITY, isc_logdestination::file, FILE_MAXREACHED, FILE_MAXSIZE, FILE_NAME, FILE_STREAM, FILE_VERSIONS, isc_logchannel::flags, ISC_FALSE, ISC_LINK_INIT, ISC_LIST_PREPEND, ISC_LOG_BUFFERED, ISC_LOG_CRITICAL, ISC_LOG_DEBUGONLY, ISC_LOG_PRINTALL, ISC_LOG_ROLLNEVER, ISC_LOG_TOFILE, ISC_LOG_TOFILEDESC, ISC_LOG_TONULL, ISC_LOG_TOSYSLOG, isc_mem_free, isc_mem_get, isc_mem_put, isc_mem_strdup, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_R_UNEXPECTED, isc_logconfig::lctx, isc_logchannel::level, isc_logfile::maximum_size, isc_log::mctx, isc_logfile::name, isc_logchannel::name, REQUIRE, isc_logfile::stream, isc_logchannel::type, VALID_CONFIG, and isc_logfile::versions.
Referenced by channel_fromconf(), dns_test_begin(), isc_logconfig_create(), isc_test_begin(), main(), ns_log_setdefaultchannels(), ns_log_setsafechannels(), and setup_logging().
isc_result_t isc_log_usechannel | ( | isc_logconfig_t * | lcfg, | |
const char * | name, | |||
const isc_logcategory_t * | category, | |||
const isc_logmodule_t * | module | |||
) |
Associate a named logging channel with a category and module that will use it.
Notes:
Ensures:
Definition at line 790 of file log.c.
References assignchannel(), isc_log::category_count, isc_logmodule::id, isc_logcategory::id, ISC_LIST_HEAD, ISC_LIST_NEXT, ISC_R_NOTFOUND, ISC_R_SUCCESS, isc_logconfig::lctx, isc_log::module_count, isc_logchannel::name, REQUIRE, and VALID_CONFIG.
Referenced by category_fromconf(), dns_client_create(), dns_test_begin(), isc_test_begin(), main(), ns_log_setdefaultcategory(), ns_log_setunmatchedcategory(), setup_libs(), setup_logging(), and setup_system().
void isc_log_write | ( | isc_log_t * | lctx, | |
isc_logcategory_t * | category, | |||
isc_logmodule_t * | module, | |||
int | level, | |||
const char * | format, | |||
... | ||||
) |
Write a message to the log channels.
Notes:
Referenced by acache_cleaning_timer_action(), acache_incremental_cleaning_action(), acache_overmem_cleaning_action(), add_bad(), add_cidr(), add_keydata_zone(), add_listener(), adjust_interfaces(), adjust_quantum(), assertion_failed(), badname(), begin_cleaning(), cache_name(), category_fromconf(), cfg_obj_log(), check_lockfile(), cleaning_timer_action(), cleanup(), client_ok(), client_request(), closeandrename(), closeversion(), configure_listener(), configure_staticstub(), configure_view(), configure_view_dnsseckeys(), configure_zone(), configure_zone_ssutable(), control_newconn(), control_senddone(), create_empty_zone(), create_managers(), debit_log(), debit_rrl_entry(), decrement_reference(), del_name(), delete_node(), detachnode(), diff_apply(), dispatch_log(), dns64_reverse(), dns_acache_setcleaninginterval(), dns_cache_detach(), dns_cache_setcleaninginterval(), dns_db_create(), dns_db_diffx(), dns_diff_load(), dns_diff_print(), dns_dlz_ssumatch(), dns_dlz_writeablezone(), dns_dlzcreate(), dns_dlzdestroy(), dns_dlzregister(), dns_dlzunregister(), dns_dnssec_findmatchingkeys(), dns_dnssec_findzonekeys2(), dns_dnssec_keylistfromrdataset(), dns_dnssec_verify3(), dns_journal_commit(), dns_journal_print(), dns_journal_rollforward(), dns_journal_writediff(), dns_master_dumpnode(), dns_message_parse(), dns_ntatable_covered(), dns_resolver_logfetch(), dns_root_checkhints(), dns_rootns_create(), dns_rpz_find_ip(), dns_rpz_find_name(), dns_rpz_ready(), dns_rrl(), dns_tsigkey_createfromkey(), dns_zone_log(), dns_zone_logc(), do_addzone(), do_modzone(), do_scan(), dst__privstruct_writefile(), dump_counters(), dump_symboltable(), dumpdone(), dumptostreaminc(), end_cleaning(), expand_entries(), expand_rrl_hash(), expirenode(), fatal(), fctx_getaddresses(), fctx_log(), fctx_sendevents(), fctx_try(), findname(), findnodeintree(), fix_triggers(), flush_deletions(), flushandsync(), free_rbtdb(), freezezones(), generate_salt(), generate_session_key(), get_rndckey(), get_view_querysource_dispatch(), hash_divisor(), incremental_cleaning_action(), internal_current4(), is_answeraddress_allowed(), is_answertarget_allowed(), isc_file_openuniquemode(), journal_file_create(), journal_fsync(), journal_next(), journal_open(), journal_read(), journal_seek(), journal_write(), library_fatal_error(), library_unexpected_error(), listener_bind(), listener_startclients(), load_configuration(), loadconfig(), loadnode(), log_edns(), log_end(), log_fetch(), log_formerr(), log_invalid(), log_lame(), log_ns_ttl(), log_nsid(), log_rr(), logfmtpacket(), make_log_buf(), maybe_free_rbtdb(), mgr_log(), notify_log(), ns_add_reserved_dispatch(), ns_client_logv(), ns_control_docommand(), ns_controls_configure(), ns_geoip_load(), ns_interface_accepttcp(), ns_interface_create(), ns_interface_listenudp(), ns_interfacemgr_scan0(), ns_lwdclient_recv(), ns_lwdclient_stateidle(), ns_lwdmanager_create(), ns_lwresd_configure(), ns_lwresd_parseeresolvconf(), ns_main_earlyfatal(), 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_xfr_start(), ns_zone_configure(), nzf_remove(), opcodestat_dump(), opentmp(), overmem_cleaning_action(), parser_complain(), previous_closest_nsec(), purge_old_interfaces(), rdatasetstats_dump(), rdtypestat_dump(), read_one_rr(), reconfig(), reload(), report(), request_log(), respond(), resquery_response(), roll_forward(), save_nsec3param(), schedule(), set_age(), set_limit(), setup(), setup_locals(), shutdown_listener(), shutdown_server(), spillattimer_countdown(), trim_ns_ttl(), try_dscp_v4(), try_proto(), tsig_log(), update_listener(), validator_logv(), view_loaded(), wakeup_socket(), water(), writeheader(), xfrin_logv(), zone_debuglog(), zone_postload(), and zone_replacedb().
void void isc_log_vwrite | ( | isc_log_t * | lctx, | |
isc_logcategory_t * | category, | |||
isc_logmodule_t * | module, | |||
int | level, | |||
const char * | format, | |||
va_list | args | |||
) |
Write a message to the log channels.
Notes:
Referenced by DP(), gss_log(), isclog_error_callback(), isclog_warn_callback(), library_fatal_error(), library_unexpected_error(), ns_lwdclient_log(), ns_main_earlyfatal(), ns_main_earlywarning(), req_log(), sdlz_log(), ssu_e_log(), and tkey_log().
void void void isc_log_write1 | ( | isc_log_t * | lctx, | |
isc_logcategory_t * | category, | |||
isc_logmodule_t * | module, | |||
int | level, | |||
const char * | format, | |||
... | ||||
) |
Write a message to the log channels, pruning duplicates that occur within a configurable amount of seconds (see isc_log_[sg]etduplicateinterval). This function is otherwise identical to isc_log_write().
void void void void isc_log_vwrite1 | ( | isc_log_t * | lctx, | |
isc_logcategory_t * | category, | |||
isc_logmodule_t * | module, | |||
int | level, | |||
const char * | format, | |||
va_list | args | |||
) |
Write a message to the log channels, pruning duplicates that occur within a configurable amount of seconds (see isc_log_[sg]etduplicateinterval). This function is otherwise identical to isc_log_vwrite().
void void void void void isc_log_iwrite | ( | isc_log_t * | lctx, | |
isc_logcategory_t * | category, | |||
isc_logmodule_t * | module, | |||
int | level, | |||
isc_msgcat_t * | msgcat, | |||
int | msgset, | |||
int | message, | |||
const char * | format, | |||
... | ||||
) |
These are four internationalized versions of the isc_log_[v]write[1] functions.
The only difference is that they take arguments for a message catalog, message set, and message number, all immediately preceding the format argument. The format argument becomes the default text, a la isc_msgcat_get. If the message catalog is NULL, no lookup is attempted for a message -- which makes the message set and message number irrelevant, and the non-internationalized call should have probably been used instead.
Yes, that means there are now *eight* interfaces to logging a message. Sheesh. Make the madness stop!
Referenced by internal_accept(), and socket_log().
void void void void void void isc_log_ivwrite | ( | isc_log_t * | lctx, | |
isc_logcategory_t * | category, | |||
isc_logmodule_t * | module, | |||
int | level, | |||
isc_msgcat_t * | msgcat, | |||
int | msgset, | |||
int | message, | |||
const char * | format, | |||
va_list | args | |||
) |
These are four internationalized versions of the isc_log_[v]write[1] functions.
The only difference is that they take arguments for a message catalog, message set, and message number, all immediately preceding the format argument. The format argument becomes the default text, a la isc_msgcat_get. If the message catalog is NULL, no lookup is attempted for a message -- which makes the message set and message number irrelevant, and the non-internationalized call should have probably been used instead.
Yes, that means there are now *eight* interfaces to logging a message. Sheesh. Make the madness stop!
void void void void void void void isc_log_iwrite1 | ( | isc_log_t * | lctx, | |
isc_logcategory_t * | category, | |||
isc_logmodule_t * | module, | |||
int | level, | |||
isc_msgcat_t * | msgcat, | |||
int | msgset, | |||
int | message, | |||
const char * | format, | |||
... | ||||
) |
These are four internationalized versions of the isc_log_[v]write[1] functions.
The only difference is that they take arguments for a message catalog, message set, and message number, all immediately preceding the format argument. The format argument becomes the default text, a la isc_msgcat_get. If the message catalog is NULL, no lookup is attempted for a message -- which makes the message set and message number irrelevant, and the non-internationalized call should have probably been used instead.
Yes, that means there are now *eight* interfaces to logging a message. Sheesh. Make the madness stop!
void void void void void void void void isc_log_ivwrite1 | ( | isc_log_t * | lctx, | |
isc_logcategory_t * | category, | |||
isc_logmodule_t * | module, | |||
int | level, | |||
isc_msgcat_t * | msgcat, | |||
int | msgset, | |||
int | message, | |||
const char * | format, | |||
va_list | args | |||
) |
These are four internationalized versions of the isc_log_[v]write[1] functions.
The only difference is that they take arguments for a message catalog, message set, and message number, all immediately preceding the format argument. The format argument becomes the default text, a la isc_msgcat_get. If the message catalog is NULL, no lookup is attempted for a message -- which makes the message set and message number irrelevant, and the non-internationalized call should have probably been used instead.
Yes, that means there are now *eight* interfaces to logging a message. Sheesh. Make the madness stop!
void void void void void void void void void isc_log_setdebuglevel | ( | isc_log_t * | lctx, | |
unsigned int | level | |||
) |
Set the debugging level used for logging.
Notes:
Definition at line 956 of file log.c.
References isc_log::debug_level, FILE_STREAM, isc_logchannel::flags, ISC_LIST_HEAD, ISC_LIST_NEXT, ISC_LOG_DEBUGONLY, ISC_LOG_TOFILE, isc_log::lock, LOCK, isc_log::logconfig, REQUIRE, isc_logchannel::type, UNLOCK, and VALID_CONTEXT.
Referenced by dns_client_create(), ns_control_docommand(), ns_log_setdefaultchannels(), ns_log_setsafechannels(), ns_server_setdebuglevel(), setup_libs(), and setup_system().
unsigned int isc_log_getdebuglevel | ( | isc_log_t * | lctx | ) |
Get the current debugging level.
Notes:
Definition at line 981 of file log.c.
References isc_log::debug_level, REQUIRE, and VALID_CONTEXT.
isc_boolean_t isc_log_wouldlog | ( | isc_log_t * | lctx, | |
int | level | |||
) |
Determine whether logging something to 'lctx' at 'level' would actually cause something to be logged somewhere.
If ISC_FALSE is returned, it is guaranteed that nothing would be logged, allowing the caller to omit unnecessary isc_log_write() calls and possible message preformatting.
Definition at line 1380 of file log.c.
References ISC_FALSE, ISC_TF, and isc_log::logconfig.
Referenced by badname(), cfg_obj_log(), debit_rrl_entry(), decrement_reference(), dispatch_createudp(), dispatch_log(), dns_adb_createfind2(), dns_rrl(), dns_zone_log(), dns_zone_logc(), doio_recv(), dump_symboltable(), expand_entries(), expand_rrl_hash(), expirenode(), hash_divisor(), isc_log_doit(), log_fetch(), log_query(), log_queryerror(), logfmtpacket(), mgr_log(), notify_log(), ns_client_dumpmessage(), ns_client_error(), ns_client_log(), possibly_mark(), query_find(), query_getcachedb(), query_resume(), query_validatezonedb(), request_log(), rpz_getdb(), rpz_log_fail(), rpz_log_rewrite(), sendstream(), socket_log(), tsig_log(), udp_recv(), update_action(), update_log(), validator_log(), view_find(), xfrin_log(), xfrin_log1(), and zone_debuglog().
void isc_log_setduplicateinterval | ( | isc_logconfig_t * | lcfg, | |
unsigned int | interval | |||
) |
Set the interval over which duplicate log messages will be ignored by isc_log_[v]write1(), in seconds.
Notes:
Definition at line 988 of file log.c.
References REQUIRE, and VALID_CONFIG.
unsigned int isc_log_getduplicateinterval | ( | isc_logconfig_t * | lcfg | ) |
Get the current duplicate filtering interval.
Requires:
Definition at line 995 of file log.c.
References REQUIRE, and VALID_CONTEXT.
isc_result_t isc_log_settag | ( | isc_logconfig_t * | lcfg, | |
const char * | tag | |||
) |
Set the program name or other identifier for ISC_LOG_PRINTTAG.
Requires:
Definition at line 1002 of file log.c.
References isc_mem_free, isc_mem_strdup, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_logconfig::lctx, isc_log::mctx, REQUIRE, and VALID_CONFIG.
Referenced by main(), and setup_logging().
char* isc_log_gettag | ( | isc_logconfig_t * | lcfg | ) |
Get the current identifier printed with ISC_LOG_PRINTTAG.
Requires:
Definition at line 1022 of file log.c.
References REQUIRE, and VALID_CONFIG.
void isc_log_opensyslog | ( | const char * | tag, | |
int | options, | |||
int | facility | |||
) |
Initialize syslog logging.
Notes:
tag: The string to use in the position of the program name in syslog messages. Most (all?) syslogs will use basename(argv[0]) if tag is NULL. options: LOG_CONS, LOG_PID, LOG_NDELAY ... whatever your syslog supports. facility: The default syslog facility. This is irrelevant since isc_log_write will ALWAYS use the channel's declared facility.
void isc_log_closefilelogs | ( | isc_log_t * | lctx | ) |
Close all open files used by ISC_LOG_TOFILE channels.
Notes:
Definition at line 1035 of file log.c.
References FILE_STREAM, ISC_LIST_HEAD, ISC_LIST_NEXT, ISC_LOG_TOFILE, isc_log::lock, LOCK, isc_log::logconfig, REQUIRE, isc_logchannel::type, UNLOCK, and VALID_CONTEXT.
isc_logcategory_t* isc_log_categorybyname | ( | isc_log_t * | lctx, | |
const char * | name | |||
) |
Find a category by its name.
Notes:
Definition at line 614 of file log.c.
References isc_log::categories, DE_CONST, isc_logcategory::id, isc_logcategory::name, REQUIRE, and VALID_CONTEXT.
Referenced by bind9_check_logging(), and category_fromconf().
isc_logmodule_t* isc_log_modulebyname | ( | isc_log_t * | lctx, | |
const char * | name | |||
) |
Find a module by its name.
Notes:
Definition at line 681 of file log.c.
References DE_CONST, isc_logmodule::id, isc_log::modules, isc_logmodule::name, REQUIRE, and VALID_CONTEXT.
void isc_log_setcontext | ( | isc_log_t * | lctx | ) |
Sets the context used by the libisc for logging.
Requires:
Definition at line 951 of file log.c.
Referenced by cleanup_logging(), dns_client_create(), dns_test_begin(), isc_test_begin(), main(), ns_log_init(), ns_log_shutdown(), setup_libs(), setup_logging(), and setup_system().
LIBISC_EXTERNAL_DATA isc_logcategory_t isc_categories[] |
The built-in categories of libisc.
Each library registering categories should provide library_LOGCATEGORY_name definitions with indexes into its isc_logcategory structure corresponding to the order of the names.
When adding new categories, a corresponding ISC_LOGCATEGORY_foo definition needs to be added to <isc/log.h>.
The default category is provided so that the internal default can be overridden. Since the default is always looked up as the first channellist in the log context, it must come first in isc_categories[].
libisc logs to this context.
Definition at line 222 of file log.c.
Referenced by doio_recv(), internal_accept(), internal_current4(), isc_file_openuniquemode(), schedule(), socket_log(), try_dscp_v4(), try_proto(), and wakeup_socket().
LIBISC_EXTERNAL_DATA isc_logmodule_t isc_modules[] |