Asterisk - The Open Source Telephony Project
18.5.0
|
Asterisk Syslog Utility Functions. More...
Go to the source code of this file.
Functions | |
int | ast_syslog_facility (const char *facility) |
Maps a syslog facility name from a string to a syslog facility constant. More... | |
const char * | ast_syslog_facility_name (int facility) |
Maps a syslog facility constant to a string. More... | |
int | ast_syslog_priority (const char *priority) |
Maps a syslog priority name from a string to a syslog priority constant. More... | |
int | ast_syslog_priority_from_loglevel (int level) |
Maps an Asterisk log level (i.e. LOG_ERROR) to a syslog priority constant. More... | |
const char * | ast_syslog_priority_name (int priority) |
Maps a syslog priority constant to a string. More... | |
Variables | |
struct { | |
const char * name | |
int value | |
} | facility_map [] |
static const int | logger_level_to_syslog_map [] |
struct { | |
const char * name | |
int value | |
} | priority_map [] |
Asterisk Syslog Utility Functions.
Definition in file syslog.c.
int ast_syslog_facility | ( | const char * | facility | ) |
Maps a syslog facility name from a string to a syslog facility constant.
facility | Facility name to map (i.e. "daemon") |
syslog | facility constant (i.e. LOG_DAEMON) if found |
-1 | if facility is not found |
Definition at line 85 of file syslog.c.
References ARRAY_LEN, facility_map, and name.
Referenced by load_config(), and make_logchannel().
const char* ast_syslog_facility_name | ( | int | facility | ) |
Maps a syslog facility constant to a string.
facility | syslog facility constant to map (i.e. LOG_DAEMON) |
facility | name (i.e. "daemon") if found |
NULL | if facility is not found |
Definition at line 98 of file syslog.c.
References ARRAY_LEN, facility_map, LOG_DEBUG, LOG_NOTICE, LOG_WARNING, name, NULL, priority_map, and value.
Referenced by load_config().
int ast_syslog_priority | ( | const char * | priority | ) |
Maps a syslog priority name from a string to a syslog priority constant.
priority | Priority name to map (i.e. "notice") |
syslog | priority constant (i.e. LOG_NOTICE) if found |
-1 | if priority is not found |
Definition at line 126 of file syslog.c.
References ARRAY_LEN, name, and priority_map.
Referenced by load_config().
int ast_syslog_priority_from_loglevel | ( | int | level | ) |
Maps an Asterisk log level (i.e. LOG_ERROR) to a syslog priority constant.
level | Asterisk log level constant (i.e. LOG_ERROR) |
syslog | priority constant (i.e. LOG_ERR) if found |
-1 | if priority is not found |
Definition at line 162 of file syslog.c.
References ARRAY_LEN, ASTNUMLOGLEVELS, LOG_NOTICE, and logger_level_to_syslog_map.
Referenced by logger_print_normal().
const char* ast_syslog_priority_name | ( | int | priority | ) |
Maps a syslog priority constant to a string.
priority | syslog priority constant to map (i.e. LOG_NOTICE) |
priority | name (i.e. "notice") if found |
NULL | if priority is not found |
Definition at line 139 of file syslog.c.
References ARRAY_LEN, NULL, priority_map, and value.
Referenced by load_config().
const { ... } facility_map[] |
Referenced by ast_syslog_facility(), and ast_syslog_facility_name().
|
static |
Definition at line 152 of file syslog.c.
Referenced by ast_syslog_priority_from_loglevel().
const char* name |
Definition at line 36 of file syslog.c.
Referenced by ast_syslog_facility(), ast_syslog_facility_name(), and ast_syslog_priority().
const { ... } priority_map[] |
Referenced by ast_syslog_facility_name(), ast_syslog_priority(), and ast_syslog_priority_name().
int value |
Definition at line 37 of file syslog.c.
Referenced by __astman_get_header(), __init_manager(), access_counter_file(), add_row_to_bdb(), alloc_str(), aMYSQL_set(), analog_set_needringing(), apply_dtls_attrib(), apply_options(), ast_ari_asterisk_get_global_var(), ast_ari_channels_get_channel_var(), ast_bucket_file_json(), ast_cc_get_param(), ast_channel_adsicpe_set(), ast_channel_amaflags_set(), ast_channel_answertime_set(), ast_channel_appl_set(), ast_channel_audiohooks_set(), ast_channel_blocker_set(), ast_channel_blocker_tid_set(), ast_channel_blockproc_set(), ast_channel_caller_set(), ast_channel_callgroup_set(), ast_channel_cdr_set(), ast_channel_connected_set(), ast_channel_creationtime_set(), ast_channel_data_set(), ast_channel_dialed_set(), ast_channel_dtmf_digit_to_emulate_set(), ast_channel_dtmf_tv_set(), ast_channel_dtmff_set(), ast_channel_emulate_dtmf_duration_set(), ast_channel_fdno_set(), ast_channel_fin_set(), ast_channel_fout_set(), ast_channel_framehooks_set(), ast_channel_generator_set(), ast_channel_generatordata_set(), ast_channel_hangupcause_set(), ast_channel_hold_state_set(), ast_channel_insmpl_set(), ast_channel_internal_bridge_channel_set(), ast_channel_internal_bridge_set(), ast_channel_jb_set(), ast_channel_macropriority_set(), ast_channel_masq_set(), ast_channel_masqr_set(), ast_channel_monitor_set(), ast_channel_music_state_set(), ast_channel_outsmpl_set(), ast_channel_pbx_set(), ast_channel_pickupgroup_set(), ast_channel_priority_set(), ast_channel_readtrans_set(), ast_channel_redirecting_set(), ast_channel_rings_set(), ast_channel_sched_set(), ast_channel_sending_dtmf_digit_set(), ast_channel_sending_dtmf_tv_set(), ast_channel_set_unbridged_nolock(), ast_channel_softhangup_internal_flag_add(), ast_channel_softhangup_internal_flag_set(), ast_channel_state_set(), ast_channel_stream_set(), ast_channel_streamid_set(), ast_channel_tech_pvt_set(), ast_channel_tech_set(), ast_channel_timer_set(), ast_channel_timingdata_set(), ast_channel_timingfd_set(), ast_channel_timingfunc_set(), ast_channel_transfercapability_set(), ast_channel_varshead_set(), ast_channel_visible_indication_set(), ast_channel_vstream_set(), ast_channel_vstreamid_set(), ast_channel_whentohangup_set(), ast_channel_writetrans_set(), ast_channel_zone_set(), ast_connected_line_build_data(), ast_connected_line_parse_data(), ast_connected_line_source_describe(), ast_connected_line_source_name(), ast_custom_function_find(), ast_describe_caller_presentation(), ast_eivr_getvariable(), ast_eivr_setvariable(), ast_format_attribute_set(), ast_get_context_name(), ast_json_to_ast_variables(), ast_named_caller_presentation(), ast_party_name_charset_describe(), ast_party_name_charset_str(), ast_redirecting_build_data(), ast_redirecting_parse_data(), ast_redirecting_reason_describe(), ast_redirecting_reason_name(), ast_rtp_instance_set_prop(), ast_rtp_prop_set(), ast_set_cc_agent_policy(), ast_set_cc_max_agents(), ast_set_cc_max_monitors(), ast_set_cc_monitor_policy(), ast_set_cc_offer_timer(), ast_set_cc_recall_timer(), ast_set_ccbs_available_timer(), ast_set_ccnr_available_timer(), ast_sip_call_codec_pref_to_str(), ast_slinear_saturated_divide(), ast_sorcery_objectset_json_create(), ast_statsd_log(), ast_statsd_log_full(), ast_statsd_log_full_va(), ast_statsd_log_sample(), ast_statsd_log_string(), ast_statsd_log_string_va(), ast_stream_codec_prefs_parse(), ast_syslog_facility_name(), ast_syslog_priority_name(), AST_TEST_DEFINE(), ast_variable_retrieve_filtered(), asterisk_start_devicestate_publishing(), asterisk_start_mwi_publishing(), bridge_check_monitor(), build_calendar(), check_cache_aggregate(), chunked_atoh(), cli_show_subscription_common(), compare_by_value(), console_cmd(), contactstatus_to_ami(), convert_bdb_to_sqlite3(), curl_header_callback(), dahdi_chan_conf_default(), database_increment(), db_get_common(), db_gettree_common(), dialgroup_write(), double2db(), dump_queue_members(), dump_raw(), encode_length(), evaluate_history_entry(), expression_token_alloc(), find_by_value(), free_config(), func_channel_write(), func_confbridge_helper(), func_write_header(), function_realtime_read(), function_realtime_readdestroy(), get_chan_by_ast_name(), get_defaults(), get_diversion_header(), get_history_info_header(), get_mid_bundle_group(), handle_cli_ooh323_show_config(), handle_cli_ooh323_show_gk(), handle_updates(), has_media_level_attribute(), hfp_parse_ciev(), hfp_parse_cind_indicator(), hfp_send_vgs(), http_request_headers_get(), iax_ie_append_versioned_uint64(), iax_provflags2str(), ineligible_configuration(), json_utf8_check_full(), ldap_mod_create(), ldap_mod_duplicate(), load_config(), load_values_config(), lua_get_variable(), lua_get_variable_value(), lua_set_variable(), lua_set_variable_value(), msg_to_json(), my_set_needringing(), my_set_polarity(), mysql_log(), NearestNeighbor(), osp_get_varfloat(), osp_get_varint(), osp_report_qos(), oss_request(), parse_contact_header(), parse_uri_full(), pbx_builtin_importvar(), pbx_builtin_setvar(), pbx_builtin_setvar_multiple(), peerstatus_to_ami(), persistence_generator_data_struct2str(), pgsql_log(), process_echocancel(), process_sdp(), process_sdp_a_dtls(), prometheus_config_post_apply(), pvalVarDecSetValue(), realtime_ldap_entry_to_var(), realtime_ldap_result_to_vars(), realtimefield_read(), redirecting_reason_build_data(), save_response_fields_to_transport(), sayfile_exec(), set_passthru_update(), set_public_key_expiration(), set_ulimit(), setup_stunaddr(), sla_add_trunk_to_station(), sorcery_astdb_create(), sorcery_astdb_delete(), sorcery_astdb_retrieve_id(), sorcery_astdb_update(), sorcery_config_open(), sorcery_memory_cache_open(), sorcery_realtime_open(), sorcery_realtime_retrieve_multiple(), sorcery_realtime_retrieve_prefix(), sorcery_realtime_retrieve_regex(), statsd_exec(), stir_shaken_add_attest(), stir_shaken_add_iat(), stir_shaken_add_origid(), stir_shaken_add_x5u(), store_tone_zone_ring_cadence(), stun_start_monitor(), tos_handler(), transport_tos_handler(), transtime(), update_peer_lastmsgssent(), user_event_hook_cb(), userevent_exec(), vars_to_headers(), varset_to_ami(), vm_change_password(), vm_msg_forward(), vm_msg_play(), vm_msg_snapshot_create(), voicin_(), websocket_client_handshake_get_response(), and write_cel().