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 87 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 100 of file syslog.c.
References ARRAY_LEN, facility_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 128 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 164 of file syslog.c.
References ARRAY_LEN.
Referenced by ast_log_vsyslog().
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 141 of file syslog.c.
References ARRAY_LEN, priority_map, and value.
Referenced by load_config().
struct { ... } facility_map[] |
Referenced by ast_syslog_facility(), and ast_syslog_facility_name().
struct { ... } priority_map[] |
Referenced by ast_syslog_priority(), and ast_syslog_priority_name().
int value |
Definition at line 39 of file syslog.c.
Referenced by __astman_get_header(), __init_manager(), access_counter_file(), apply_options(), ast_cc_get_param(), ast_connected_line_build_data(), ast_connected_line_parse_data(), ast_connected_line_source_describe(), ast_connected_line_source_name(), ast_describe_caller_presentation(), ast_eivr_getvariable(), ast_eivr_setvariable(), 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_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_slinear_saturated_divide(), ast_syslog_facility_name(), ast_syslog_priority_name(), console_cmd(), data_search_generate(), database_increment(), dialgroup_write(), dump_queue_members(), dump_raw(), encode_length(), func_channel_write(), function_realtime_read(), function_realtime_readdestroy(), handle_updates(), httpd_helper_thread(), iax_ie_append_versioned_uint64(), iax_provflags2str(), load_values_config(), lua_get_variable(), lua_get_variable_value(), lua_set_variable(), lua_set_variable_value(), my_set_needringing(), my_set_polarity(), osp_get_varfloat(), osp_get_varint(), osp_report_qos(), parse_contact_header(), parse_uri_full(), pbx_builtin_importvar(), pbx_builtin_setvar(), pbx_builtin_setvar_multiple(), pgsql_log(), process_echocancel(), process_sdp(), pvalVarDecSetValue(), realtime_ldap_entry_to_var(), realtime_ldap_result_to_vars(), realtime_update2_handler(), realtimefield_read(), set_ulimit(), sla_add_trunk_to_station(), sort_internal(), transtime(), update_peer_lastmsgssent(), and vm_change_password().