Codename Pineapple

Home page | Mailing list | Docs

Last updated: Sat Feb 3 05:01:36 2007

Asterisk developer's documentation :: Codename Pineapple


logger.h File Reference


Detailed Description

Support for logging to various files, console and syslog Configuration in file logger.conf.

Definition in file logger.h.

#include "asterisk/compat.h"
#include <stdarg.h>

Include dependency graph for logger.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define __LOG_DEBUG   0
#define __LOG_DTMF   6
#define __LOG_ERROR   4
#define __LOG_EVENT   1
#define __LOG_NOTICE   2
#define __LOG_VERBOSE   5
#define __LOG_WARNING   3
#define _A_   __FILE__, __LINE__, __PRETTY_FUNCTION__
#define DEBUG_M(a)
#define EVENTLOG   "event_log"
#define LOG_DEBUG   __LOG_DEBUG, _A_
#define LOG_DTMF   __LOG_DTMF, _A_
#define LOG_ERROR   __LOG_ERROR, _A_
#define LOG_EVENT   __LOG_EVENT, _A_
#define LOG_NOTICE   __LOG_NOTICE, _A_
#define LOG_VERBOSE   __LOG_VERBOSE, _A_
#define LOG_WARNING   __LOG_WARNING, _A_
#define QUEUELOG   "queue_log"
#define VERBOSE_PREFIX_1   " "
#define VERBOSE_PREFIX_2   " == "
#define VERBOSE_PREFIX_3   " -- "
#define VERBOSE_PREFIX_4   " > "

Functions

void void ast_backtrace (void)
void ast_console_puts (const char *string)
void ast_console_puts_mutable (const char *string)
 log the string to the console, and all attached console clients
void ast_console_toggle_mute (int fd)
 mute or unmute a console from logging
void ast_log (int level, const char *file, int line, const char *function, const char *fmt,...) __attribute__((format(printf
 This is the standard logger function. Probably the only way you will invoke it would be something like this: ast_log(LOG_WHATEVER, "Problem with the %s Captain. We should get some more. Will %d be enough?\n", "flux capacitor", 10); where WHATEVER is one of ERROR, DEBUG, EVENT, NOTICE, or WARNING depending on which log you wish to output to. These are implemented as macros, that will provide the function with the needed arguments.
void ast_queue_log (const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt,...) __attribute__((format(printf
void void int ast_register_verbose (void(*verboser)(const char *string))
int ast_unregister_verbose (void(*verboser)(const char *string))
void void ast_verbose (const char *fmt,...) __attribute__((format(printf
 This works like ast_log, but prints verbose messages to the console depending on verbosity level set. ast_verbose(VERBOSE_PREFIX_3 "Whatever %s is happening\n", "nothing"); This will print the message to the console if the verbose level is set to a level >= 3 Note the abscence of a comma after the VERBOSE_PREFIX_3. This is important. VERBOSE_PREFIX_1 through VERBOSE_PREFIX_3 are defined.


Define Documentation

#define __LOG_DEBUG   0
 

Definition at line 93 of file logger.h.

Referenced by ast_log(), ast_log_vsyslog(), handle_logger_show_channels(), and make_components().

#define __LOG_DTMF   6
 

Definition at line 129 of file logger.h.

Referenced by ast_log_vsyslog(), handle_logger_show_channels(), and make_components().

#define __LOG_ERROR   4
 

Definition at line 117 of file logger.h.

Referenced by handle_logger_show_channels(), and make_components().

#define __LOG_EVENT   1
 

Definition at line 99 of file logger.h.

Referenced by handle_logger_show_channels(), logger_print_normal(), and make_components().

#define __LOG_NOTICE   2
 

Definition at line 105 of file logger.h.

Referenced by handle_logger_show_channels(), and make_components().

#define __LOG_VERBOSE   5
 

Definition at line 123 of file logger.h.

Referenced by ast_log(), ast_log_vsyslog(), handle_logger_show_channels(), logger_print_normal(), and make_components().

#define __LOG_WARNING   3
 

Definition at line 111 of file logger.h.

Referenced by handle_logger_show_channels(), and make_components().

#define _A_   __FILE__, __LINE__, __PRETTY_FUNCTION__
 

Definition at line 88 of file logger.h.

#define DEBUG_M  ) 
 

Value:

{ \
   a; \
}

Definition at line 39 of file logger.h.

#define EVENTLOG   "event_log"
 

Definition at line 36 of file logger.h.

Referenced by init_logger().

#define LOG_DEBUG   __LOG_DEBUG, _A_
 

Definition at line 94 of file logger.h.

Referenced by __adsi_transmit_messages(), __ast_check_signature_bin(), __ast_device_state_changed_literal(), __ast_pbx_run(), __ast_play_and_record(), __ast_read(), __login_exec(), __oh323_destroy(), __oh323_rtp_create(), __oh323_update_info(), __sip_ack(), __sip_autodestruct(), __sip_destroy(), __sip_reliable_xmit(), __sip_semi_ack(), __transmit_response(), __zt_exception(), action_waitevent(), add_header(), add_realm_authentication(), add_sip_domain(), add_t38_sdp(), agent_bridgedchannel(), agent_call(), agent_cont_sleep(), agent_hangup(), agent_read(), agent_request(), agent_write(), aji_act_hook(), aji_handle_presence(), alloc_sub(), alsa_card_init(), alsa_write(), answer_call(), ast_add_hint(), ast_adsi_load_session(), ast_apply_ha(), ast_bridge_call(), ast_cdr_detach(), ast_cdr_submit_batch(), ast_channel_inherit_variables(), ast_channel_masquerade(), ast_channel_register(), ast_channel_spy_add(), ast_channel_unregister(), ast_control_streamfile(), ast_db_del(), ast_db_get(), ast_device_state(), ast_do_masquerade(), ast_dsp_busydetect(), ast_dsp_process(), ast_dsp_set_busy_pattern(), ast_feature_interpret(), ast_get_enum(), ast_hangup(), ast_indicate_data(), ast_internal_timing_enabled(), ast_io_add(), ast_io_dump(), ast_io_wait(), ast_monitor_start(), ast_monitor_stop(), ast_parse_allow_disallow(), ast_pickup_call(), ast_prod(), ast_queue_frame(), ast_rtcp_read(), ast_rtp_early_bridge(), ast_rtp_make_compatible(), ast_rtp_raw_write(), ast_rtp_read(), ast_rtp_write(), ast_say_date_with_format_da(), ast_say_date_with_format_de(), ast_say_date_with_format_en(), ast_say_date_with_format_es(), ast_say_date_with_format_fr(), ast_say_date_with_format_gr(), ast_say_date_with_format_he(), ast_say_date_with_format_it(), ast_say_date_with_format_nl(), ast_say_date_with_format_pl(), ast_say_date_with_format_pt(), ast_say_date_with_format_tw(), ast_say_enumeration_full_da(), ast_say_enumeration_full_de(), ast_say_enumeration_full_en(), ast_say_number_full_da(), ast_say_number_full_de(), ast_say_number_full_en(), ast_say_number_full_en_GB(), ast_say_number_full_es(), ast_say_number_full_fr(), ast_say_number_full_gr(), ast_say_number_full_he(), ast_say_number_full_it(), ast_say_number_full_nl(), ast_say_number_full_no(), ast_say_number_full_ru(), ast_say_number_full_se(), ast_say_number_full_tw(), ast_sched_add_variable(), ast_sched_del(), ast_sched_dump(), ast_sched_runq(), ast_sched_wait(), ast_sched_when(), ast_search_dns(), ast_senddigit_begin(), ast_settimeout(), ast_sip_ouraddrfor(), ast_smdi_mwi_set(), ast_smdi_mwi_unset(), ast_softhangup_nolock(), ast_streamfile(), ast_udptl_read(), ast_writestream(), attempt_transfer(), available(), bridge_native_loop(), bridge_p2p_rtp_write(), build_device(), build_reply_digest(), build_route(), builtin_atxfer(), cache_lookup_internal(), cache_save_hint(), callerid_feed_jp(), callerid_get_dtmf(), chan_ringing(), channel_find_locked(), check_availability(), check_beep(), check_key(), cleanup_connection(), conf_add(), conf_del(), config_pgsql(), config_text_file_load(), config_text_file_save(), connection_made(), copy_request(), create_addr(), create_addr_from_peer(), crypto_load(), device_ref(), device_unref(), dialog_activate_media(), dialog_lock(), dialoglist_lock(), dialoglist_unlock(), dialogstatechange(), do_cdr(), do_monitor(), do_parking_thread(), do_proxy_auth(), do_register_expire(), do_setnat(), do_state_change(), dump_agents(), dundi_answer_entity(), dundi_answer_query(), dundi_decrypt(), dundi_encrypt(), dundi_lookup_thread(), dundi_precache_thread(), dundi_query_thread(), external_rtp_create(), find_call(), find_peer(), find_subchannel_and_lock(), find_user(), find_via_branch(), generator_force(), get_destination(), get_refer_info(), get_sip_dialog_byid_locked(), getproviderstate(), gtalk_alloc(), gtalk_answer(), gtalk_hangup_farend(), gtalk_is_answered(), gtalk_parser(), gtalk_rtp_read(), handle_command_response(), handle_getoption(), handle_offhook_message(), handle_request(), handle_request_refer(), handle_response_register(), handle_stimulus_message(), handle_streamfile(), hangup_cause2sip(), hangup_connection(), iax_provision_version(), init_req(), initialize_initreq(), io_grow(), jb_put(), jingle_alloc(), jingle_answer(), jingle_hangup_farend(), jingle_is_answered(), jingle_parser(), jingle_rtp_read(), launch_netscript(), load_module(), load_modules(), local_attended_transfer(), local_devicestate(), local_write(), logdebug_va(), match_or_create_dialog(), metermaidstate(), mgcp_answer(), mgcp_hangup(), mgcp_rtp_read(), mgcp_ss(), mgcpsock_read(), misdn_hangup(), mkif(), my_zt_write(), nbs_call(), nbs_hangup(), nbs_xread(), notify_metermaids(), oh323_answer(), oh323_call(), oh323_destroy(), oh323_destroy_alias(), oh323_destroy_peer(), oh323_destroy_user(), oh323_hangup(), oh323_indicate(), oh323_request(), oh323_rtp_read(), parse_config(), parse_moved_contact(), parse_naptr(), parse_request(), parse_sip_options(), pbx_extension_helper(), pbx_substitute_variables_helper_full(), pgsql_reconnect(), phone_answer(), phone_call(), phone_check_exception(), phone_digit_end(), phone_exception(), phone_hangup(), phone_indicate(), pl_odtworz_plik(), printdigest(), process_ast_dsp(), process_cisco_dtmf(), process_message(), process_rfc2833(), process_rfc3389(), process_sip_queue(), progress(), queue_frame_to_spies(), realtime_multi_pgsql(), realtime_pgsql(), rebuild_matrix(), register_verify(), registry_addref(), registry_unref(), reload(), reload_agents(), reload_config(), remote_hold(), reqprep(), reset_global_eid(), restore_conference(), retrans_pkt(), run_agi(), save_conference(), scan_service(), sched_settime(), schedule_delivery(), send_digit_to_chan(), send_dtmf(), send_packet(), send_request(), server_start(), set_actual_rxgain(), set_actual_txgain(), set_device_host(), set_dtmf_payload(), set_format(), set_local_capabilities(), set_peer_capabilities(), setup_incoming_call(), setup_rtp_connection(), sip_alloc(), sip_alreadygone(), sip_answer(), sip_call(), sip_config_parse(), sip_destroy(), sip_destroy_peer(), sip_destroy_user(), sip_dump_history(), sip_fixup(), sip_hangup(), sip_method2txt(), sip_new(), sip_option_lookup(), sip_ouraddrfor(), sip_park(), sip_park_thread(), sip_read(), sip_registry_destroy(), sip_rtp_read(), sipnet_lock(), sipnet_unlock(), siprequest_alloc(), siprequest_free(), sipsock_init(), sipsock_read(), skinny_hangup(), skinny_rtp_read(), skinny_ss(), spy_detach(), ss_thread(), stun_handle_packet(), swap_subs(), t38_get_rate(), transmit_invite(), transmit_refer(), transmit_register(), transmit_response_with_attachment(), transmit_trunk(), try_load_key(), unalloc_sub(), unwrap_timestamp(), update_call_counter(), update_pgsql(), zt_answer(), zt_bridge(), zt_call(), zt_digit_begin(), zt_digit_end(), zt_disable_ec(), zt_enable_ec(), zt_fixup(), zt_handle_event(), zt_hangup(), zt_indicate(), zt_read(), zt_setoption(), zt_train_ec(), zt_unlink(), and zt_write().

#define LOG_DTMF   __LOG_DTMF, _A_
 

Definition at line 130 of file logger.h.

Referenced by __ast_read(), __oh323_update_info(), oh323_digit_begin(), oh323_digit_end(), oh323_rtp_read(), and receive_digit().

#define LOG_ERROR   __LOG_ERROR, _A_
 

Definition at line 118 of file logger.h.

Referenced by __agent_start_monitoring(), __get_header(), __oh323_rtp_create(), agent_new(), agi_debug_cli(), aji_act_hook(), aji_client_connect(), aji_client_info_handler(), aji_client_initialize(), aji_component_initialize(), aji_create_client(), aji_dinfo_handler(), aji_ditems_handler(), aji_find_version(), aji_handle_presence(), aji_handle_subscribe(), aji_register_approve_handler(), aji_register_query_handler(), aji_reload(), aji_send_exec(), aji_set_presence(), aji_status_exec(), alsa_card_init(), alsa_read(), alsa_write(), answer_call(), ast_aji_create_chat(), ast_aji_invite_chat(), ast_aji_join_chat(), ast_aji_send(), ast_cdr_engine_init(), ast_cdr_serialize_variables(), ast_cdr_setvar(), ast_channel_setoption(), ast_channel_start_silence_generator(), ast_channel_stop_silence_generator(), ast_custom_function_register(), ast_device_state_engine_init(), ast_func_read(), ast_func_write(), ast_get_group(), ast_jb_put(), ast_lock_path(), ast_netsock_bindaddr(), ast_pbx_outgoing_exten(), ast_rtcp_write_rr(), ast_rtcp_write_sr(), ast_rtp_new_with_bindaddr(), ast_rtp_sendcng(), ast_rtp_senddigit_begin(), ast_rtp_senddigit_continuation(), ast_rtp_senddigit_end(), ast_smdi_mwi_set(), ast_smdi_mwi_unset(), ast_unlock_path(), async_wait(), build_channels(), build_device(), build_peer(), build_user(), builtin_automonitor(), callerid_feed(), callerid_feed_jp(), chan_ringing(), chandup(), check_break(), check_continue(), check_goto(), check_label(), check_pval_item(), check_srcaddr(), complete_context_add_ignorepat(), complete_context_add_include(), complete_context_remove_extension(), complete_context_remove_include(), config_text_file_load(), connection_made(), copy_data_from_queue(), dialog_lock(), dnsmgr_init(), do_monitor(), do_parking_thread(), do_reload(), extension_matches(), external_rtp_create(), find_pval_goto_item(), gtalk_alloc(), gtalk_create_candidates(), gtalk_create_member(), gtalk_digit(), gtalk_invite(), gtalk_invite_response(), gtalk_request(), h323_gk_cycle(), handle_invite_replaces(), handle_open_receive_channel_ack_message(), handle_register_message(), handle_request(), handle_request_subscribe(), handle_response_invite(), init_logger(), jb_error_output(), jb_get_and_deliver(), jingle_alloc(), jingle_create_candidates(), jingle_create_member(), jingle_digit(), jingle_request(), listener(), load_config(), load_module(), load_pbx(), mkintf(), oh323_alloc(), oh323_digit_begin(), oh323_digit_end(), oh323_read(), oh323_set_rtp_peer(), parse_gain_value(), pbx_builtin_serialize_variables(), pbx_load_module(), pgsql_reconnect(), phone_request(), process_sdp(), process_sip_queue(), progress(), queue_frame_to_spies(), receive_digit(), register_verify(), reload_config(), restart_monitor(), set_config(), setup_incoming_call(), setup_rtp_connection(), setup_zap(), sip_park_thread(), sip_register(), sip_sipredirect(), sipsock_read(), skinny_call(), skinny_req_parse(), socket_process(), sound_thread(), soundcard_init(), tdd_feed(), transmit_request_with_auth(), transmit_response_with_attachment(), transmit_response_with_sdp(), transmit_response_with_t38_sdp(), update_call_counter(), and zt_call().

#define LOG_EVENT   __LOG_EVENT, _A_
 

Definition at line 100 of file logger.h.

Referenced by action_login(), attempt_thread(), init_logger(), logger_print_normal(), and scan_service().

#define LOG_NOTICE   __LOG_NOTICE, _A_
 

Definition at line 106 of file logger.h.

Referenced by __ast_decrypt_bin(), __ast_dsp_call_progress(), __ast_encrypt_bin(), __ast_read(), __ast_request_and_dial(), __ast_smoother_feed(), __auto_congest(), __login_exec(), __schedule_action(), accept_thread(), add_in_calls(), add_out_calls(), agent_call(), agent_hangup(), agent_read(), agent_request(), aji_client_info_handler(), aji_dinfo_handler(), aji_handle_presence(), aji_status_exec(), alsa_request(), alsa_write(), answer_call(), apply_outgoing(), ast_app_dtget(), ast_cdr_free(), ast_config_engine_register(), ast_db_get(), ast_dsp_busydetect(), ast_feature_request_and_dial(), ast_get_indication_zone(), ast_register_feature(), ast_rtp_read(), ast_sched_add_variable(), ast_sched_del(), ast_sip_ouraddrfor(), ast_smdi_md_message_pop(), ast_smdi_mwi_message_pop(), ast_udptl_write(), ast_unregister_indication_country(), attempt_thread(), attempt_transfer(), auto_congest(), callerid_feed(), callerid_feed_jp(), cb_events(), check_key(), check_post(), check_rtp_timeout(), check_start(), check_user_full(), cleanup_connection(), config_odbc(), convertcap(), copy_header(), crypto_load(), destroy_trans(), dnsmgr_refresh(), do_autokill(), do_register(), do_reload(), dump_queue(), dundi_encrypt(), dundi_exec(), dundi_helper(), dundi_precache_full(), dundi_precache_internal(), dundi_rexmit(), dundi_send(), feature_exec_app(), features_alloc(), features_call(), find_line_by_name(), find_subchannel_and_lock(), gtalk_handle_dtmf(), gtalk_hangup_farend(), gtalk_indicate(), gtalk_is_answered(), gtalk_newcall(), gtalk_sendhtml(), handle_add_indication(), handle_command_response(), handle_init_event(), handle_invite_replaces(), handle_playtones(), handle_request(), handle_request_bye(), handle_request_invite(), handle_request_notify(), handle_request_register(), handle_request_subscribe(), handle_response(), handle_response_answer(), handle_response_bye(), handle_response_invite(), handle_response_peerpoke(), handle_response_refer(), handle_response_register(), iax2_destroy(), iax2_read(), iax_provision_reload(), increase_call_count(), ind_load_module(), init_manager(), ivr_dispatch(), jingle_handle_dtmf(), jingle_hangup_farend(), jingle_indicate(), jingle_is_answered(), jingle_newcall(), jingle_sendhtml(), load_module(), load_odbc_config(), local_alloc(), mgcp_call(), mgcp_fixup(), mgcp_postrequest(), mgcp_request(), mgcp_rtp_read(), mgcpsock_read(), misdn_bridge(), moh3_exec(), nbs_request(), odbc_obj_connect(), oh323_call(), oh323_request(), oh323_rtp_read(), oss_request(), parse_register_contact(), parse_uri(), pbx_builtin_hangup(), pbx_extension_helper(), pbx_load_module(), pbx_substitute_variables_helper_full(), phone_request(), process_ast_dsp(), process_rfc3389(), read_agent_config(), realtime_exec(), register_verify(), reload(), reload_config(), server_start(), set_address_from_contact(), set_config(), set_ulimit(), setup_incoming_call(), setup_rtp_connection(), show_dialplan_helper(), sip_dump_history(), sip_ouraddrfor(), sip_poke_noanswer(), sip_poke_peer(), sip_reg_timeout(), sip_request_call(), sip_reregister(), sipsock_read(), skinny_fixup(), skinny_request(), smdi_load(), ss_thread(), stub_ast_check_signature(), stub_ast_check_signature_bin(), stub_ast_encdec_bin(), stub_ast_key_get(), stub_ast_sign(), stub_ast_sign_bin(), tdd_feed(), transmit_refer(), transmit_register(), transmit_response_using_temp(), try_load_key(), try_suggested_sip_codec(), update_common_options(), update_key(), zt_bridge(), zt_handle_event(), and zt_read().

#define LOG_VERBOSE   __LOG_VERBOSE, _A_
 

Definition at line 124 of file logger.h.

Referenced by transmit_response(), and unload_module().

#define LOG_WARNING   __LOG_WARNING, _A_
 

Definition at line 112 of file logger.h.

Referenced by __adsi_transmit_messages(), __ast_check_signature(), __ast_check_signature_bin(), __ast_cli_unregister(), __ast_context_create(), __ast_decrypt_bin(), __ast_dsp_call_progress(), __ast_encrypt_bin(), __ast_format_register(), __ast_pbx_run(), __ast_play_and_record(), __ast_read(), __ast_register_translator(), __ast_sign_bin(), __ast_smoother_feed(), __attempt_transmit(), __login_exec(), __mgcp_xmit(), __oh323_destroy(), __oh323_new(), __oh323_rtp_create(), __sip_autodestruct(), __sip_pretend_ack(), __sip_xmit(), __transmit_response(), __unload_module(), _extension_match_core(), accept_thread(), ack_trans(), add_agent(), add_codec_to_answer(), add_extensions(), add_header(), add_line(), add_realm_authentication(), add_redirect(), add_sdp(), add_sip_domain(), add_t38_sdp(), adsi_careful_send(), agent_answer(), agent_call(), agent_fixup(), agent_new(), agent_request(), agentmonitoroutgoing_exec(), agi_exec(), agi_exec_full(), aji_act_hook(), aji_create_buddy(), aji_dinfo_handler(), aji_load_config(), aji_recv_loop(), aji_send_exec(), aji_status_exec(), alloc_sub(), alsa_card_init(), alsa_indicate(), alsa_new(), alsa_request(), alsa_write(), apply_outgoing(), ast_adsi_get_cpeid(), ast_adsi_get_cpeinfo(), ast_adsi_load_session(), ast_adsi_transmit_message_full(), ast_agi_register(), ast_aji_send(), ast_app_parse_options(), ast_append_ha(), ast_async_goto(), ast_autoservice_start(), ast_best_codec(), ast_bridge_call(), ast_cdr_disposition(), ast_cdr_end(), ast_cdr_init(), ast_cdr_register(), ast_cdr_submit_batch(), ast_channel_alloc(), ast_channel_bridge(), ast_channel_free(), ast_channel_make_compatible_helper(), ast_channel_masquerade(), ast_channel_register(), ast_channel_spy_add(), ast_check_timing(), ast_codec_get_len(), ast_codec_get_samples(), ast_compile_ael2(), ast_config_internal_load(), ast_db_gettree(), ast_db_put(), ast_dsp_call_progress(), ast_dsp_digitdetect(), ast_dsp_process(), ast_dsp_silence(), ast_enable_packet_fragmentation(), ast_extension_close(), ast_filehelper(), ast_find_ourip(), ast_format_unregister(), ast_get_channel_tech(), ast_get_group(), ast_get_ip_or_srv(), ast_hangup(), ast_iax2_new(), ast_indicate_data(), ast_io_remove(), ast_ivr_menu_run_internal(), ast_jb_put(), ast_linear_stream(), ast_lock_path(), ast_makesocket(), ast_manager_register_struct(), ast_masq_park_call(), ast_merge_contexts_and_delete(), ast_monitor_change_fname(), ast_monitor_start(), ast_monitor_stop(), ast_netsock_bindaddr(), ast_odbc_prepare_and_execute(), ast_odbc_request_obj(), ast_odbc_sanity_check(), ast_odbc_smart_execute(), ast_openstream_full(), ast_openvstream(), ast_ouraddrfor(), ast_park_call(), ast_parse_allow_disallow(), ast_pbx_start(), ast_pickup_call(), ast_playtones_start(), ast_prod(), ast_pthread_create_stack(), ast_queue_frame(), ast_read_image(), ast_read_textfile(), ast_readaudio_callback(), ast_readconfig(), ast_readfile(), ast_readvideo_callback(), ast_record_review(), ast_register_application(), ast_register_switch(), ast_remotecontrol(), ast_request(), ast_rtcp_new(), ast_rtcp_read(), ast_rtp_early_bridge(), ast_rtp_make_compatible(), ast_rtp_proto_register(), ast_rtp_read(), ast_rtp_senddigit_begin(), ast_rtp_senddigit_end(), ast_rtp_settos(), ast_rtp_write(), ast_say_date_with_format_da(), ast_say_date_with_format_de(), ast_say_date_with_format_en(), ast_say_date_with_format_es(), ast_say_date_with_format_fr(), ast_say_date_with_format_gr(), ast_say_date_with_format_he(), ast_say_date_with_format_it(), ast_say_date_with_format_nl(), ast_say_date_with_format_pl(), ast_say_date_with_format_pt(), ast_say_date_with_format_tw(), ast_say_number_full_pt(), ast_search_dns(), ast_set_priority(), ast_slinfactory_feed(), ast_smoother_read(), ast_stopstream(), ast_streamfile(), ast_translator_build_path(), ast_tryconnect(), ast_udptl_bridge(), ast_udptl_get_error_correction_scheme(), ast_udptl_get_far_max_datagram(), ast_udptl_get_local_max_datagram(), ast_udptl_offered_from_local(), ast_udptl_proto_register(), ast_udptl_read(), ast_udptl_set_error_correction_scheme(), ast_udptl_set_far_max_datagram(), ast_udptl_set_local_max_datagram(), ast_udptl_settos(), ast_udptl_write(), ast_unlock_path(), ast_waitfor_nandfds(), ast_waitfordigit_full(), ast_write(), ast_writefile(), ast_writestream(), ast_yyerror(), attempt_transfer(), authenticate(), authenticate_verify(), autoservice_run(), bridge_native_loop(), build_alias(), build_device(), build_gateway(), build_mapping(), build_peer(), build_reply_digest(), build_rpid(), build_user(), builtin_atxfer(), builtin_automonitor(), builtin_blindtransfer(), bump_gains(), calc_cost(), callerid_feed(), callerid_feed_jp(), cb_events(), chan_misdn_log(), check_access(), check_app_args(), check_compat(), check_context_names(), check_day(), check_dow(), check_expr2_input(), check_goto(), check_includes(), check_macro_returns(), check_month(), check_pval_item(), check_timerange(), check_via(), complete_context_add_extension(), complete_context_remove_ignorepat(), complete_context_remove_include(), complete_transfer(), compress_subclass(), conf_add(), conf_del(), config_odbc(), config_pgsql(), config_text_file_load(), console_autoanswer(), copy(), create_addr(), create_jb(), crypto_load(), dbinit(), destroy_pval_item(), destroy_session(), determine_firstline_parts(), dialog_activate_media(), dns_parse_answer(), do_monitor(), do_parking_thread(), do_reload(), dump_agents(), dundi_answer_entity(), dundi_answer_query(), dundi_discover(), dundi_error_output(), dundi_lookup_internal(), dundi_query(), dundi_xmit(), dundifunc_read(), eagi_exec(), enum_callback(), ext_cmp1(), extension_matches(), feature_exec_app(), features_new(), fileexists_core(), find_cache(), find_call_locked(), find_desc(), find_line_by_instance(), find_speeddial_by_instance(), find_subchannel_by_instance_reference(), find_subchannel_by_reference(), fn_wrapper(), framein(), func_args(), func_check_sipdomain(), func_header_read(), function_agent(), function_sipchaninfo_read(), g723_len(), get_also_info(), get_button_template(), get_destination(), get_in_brackets(), get_input(), get_range(), get_rdnis(), get_refer_info(), get_timerange(), gtalk_alloc(), gtalk_call(), gtalk_create_member(), gtalk_free_pvt(), gtalk_load_config(), gtalk_new(), gtalk_newcall(), gtalk_request(), gtalk_write(), handle_add_indication(), handle_command_response(), handle_common_options(), handle_error(), handle_exec(), handle_getoption(), handle_hd_hf(), handle_invite_replaces(), handle_keypad_button_message(), handle_message(), handle_offhook_message(), handle_onhook_message(), handle_recordfile(), handle_remove_indication(), handle_request(), handle_request_bye(), handle_request_info(), handle_request_invite(), handle_request_notify(), handle_response(), handle_response_answer(), handle_response_bye(), handle_response_invite(), handle_response_notify(), handle_response_refer(), handle_response_register(), handle_soft_key_event_message(), handle_stimulus_message(), iax2_ack_registry(), iax2_call(), iax2_canmatch(), iax2_do_register(), iax2_exec(), iax2_exists(), iax2_fixup(), iax2_matchmore(), iax2_poke_peer(), iax2_register(), iax2_request(), iax2_send(), iax2_trunk_queue(), iax_error_output(), iax_park(), iax_process_template(), iax_template_parse(), ind_load_module(), indexof(), init_logger_chain(), init_req(), init_resp(), jb_get_and_deliver(), jb_warning_output(), jingle_alloc(), jingle_call(), jingle_create_member(), jingle_free_pvt(), jingle_new(), jingle_newcall(), jingle_request(), jingle_write(), launch_netscript(), launch_script(), launch_service(), linear_alloc(), linear_generator(), linear_release(), listener(), load_config(), load_module(), load_moh_classes(), load_odbc_config(), local_answer(), local_ast_moh_start(), local_devicestate(), local_fixup(), local_new(), local_queue_frame(), make_file_from_fd(), make_integer(), make_str(), make_trunk(), manager_show_dialplan_helper(), memcpy_decrypt(), memcpy_encrypt(), mgcp_call(), mgcp_fixup(), mgcp_indicate(), mgcp_new(), mgcp_reload(), mgcp_request(), mgcp_ss(), mgcp_write(), mgcpsock_read(), misdn_answer(), misdn_call(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_init(), misdn_cfg_is_msn_valid(), misdn_cfg_update_ptp(), misdn_digit_end(), misdn_facility_exec(), misdn_hangup(), misdn_indication(), misdn_request(), misdn_send_text(), misdn_set_opt_exec(), misdn_write(), mkif(), moh0_exec(), moh1_exec(), moh2_exec(), moh_alloc(), moh_files_generator(), moh_files_release(), moh_generate(), moh_register(), moh_release(), moh_scan_files(), mohalloc(), monmp3thread(), nbs_alloc(), nbs_call(), nbs_hangup(), nbs_new(), nbs_xwrite(), netconsole(), odbc_obj_connect(), odbc_obj_disconnect(), odbc_register_class(), oh323_call(), oh323_fixup(), oh323_hangup(), oh323_indicate(), oh323_request(), oh323_write(), op_colon(), op_div(), op_eq(), op_eqtilde(), op_minus(), op_negate(), op_plus(), op_rem(), op_times(), oss_indicate(), oss_new(), oss_request(), park_exec(), parse(), parse_args(), parse_config(), parse_ie(), parse_naptr(), parse_register_contact(), parse_srv(), pbx_extension_helper(), pbx_find_extension(), peer_set_srcaddr(), phone_call(), phone_digit_end(), phone_exception(), phone_hangup(), phone_indicate(), phone_mini_packet(), phone_new(), phone_read(), phone_setup(), phone_write(), phone_write_buf(), playtones_alloc(), playtones_generator(), post_cdr(), powerof(), precache_trans(), precache_transactions(), process_ast_dsp(), process_sdp(), process_text_line(), queue_frame_to_spies(), read_config(), realtime_multi_odbc(), realtime_multi_pgsql(), realtime_odbc(), realtime_pgsql(), receive_message(), refresh_list(), register_peer_exten(), register_verify(), registry_authrequest(), registry_rerequest(), reload(), reload_config(), reload_firmware(), remove_from_queue(), reply_digest(), reqprep(), reset_conf(), restart_monitor(), restore_conference(), restore_gains(), retrans_pkt(), run_agi(), safe_append(), save_conference(), scan_service(), scan_thread(), send_callerid(), send_request(), send_sound(), server_root(), server_start(), set_address_from_contact(), set_config(), set_destination(), set_format(), set_full_cmd(), set_timing(), set_ulimit(), setformat(), show_channeltype(), show_channeltypes(), show_dialplan_helper(), sip_addheader(), sip_alloc(), sip_call(), sip_dtmfmode(), sip_fixup(), sip_hangup(), sip_indicate(), sip_new(), sip_notify(), sip_park(), sip_park_thread(), sip_register(), sip_write(), siprequest_alloc(), sipsock_init(), sipsock_read(), sipsocket_open(), skinny_call(), skinny_fixup(), skinny_indicate(), skinny_new(), skinny_newcall(), skinny_request(), skinny_ss(), skinny_write(), socket_process(), socket_process_meta(), socket_read(), sound_thread(), soundcard_writeframe(), spawn_dp_lookup(), spawn_mp3(), speex_get_wb_sz_at(), speex_samples(), srv_callback(), start_network_thread(), store_boost(), store_mixer(), tdd_feed(), tdd_new(), timing_read(), to_integer(), to_string(), tonepair_alloc(), tonepair_generator(), transmit_final_response(), transmit_invite(), transmit_notify_with_mwi(), transmit_register(), transmit_request_with_auth(), transmit_response(), transmit_response_with_auth(), transmit_response_with_sdp(), transmit_response_with_t38_sdp(), transmit_state_notify(), try_firmware(), try_load_key(), try_transfer(), tvfix(), unalloc_sub(), unload_module(), update_call_counter(), update_common_options(), update_config(), update_odbc(), update_pgsql(), update_registry(), used_blocks(), wait_file(), waitstream_core(), zt_answer(), zt_call(), zt_callwait(), zt_confmute(), zt_digit_begin(), zt_disable_ec(), zt_enable_ec(), zt_get_index(), zt_hangup(), zt_link(), zt_set_hook(), zt_setoption(), and zt_train_ec().

#define QUEUELOG   "queue_log"
 

Definition at line 37 of file logger.h.

#define VERBOSE_PREFIX_1   " "
 

Definition at line 43 of file logger.h.

Referenced by cb_extensionstate(), console_verboser(), do_monitor(), do_sip_monitor(), handle_verbose(), load_module(), load_pbx(), load_resource(), reload(), unload_module(), and zap_restart().

#define VERBOSE_PREFIX_2   " == "
 

Definition at line 44 of file logger.h.

Referenced by __ast_format_register(), __ast_pbx_run(), __ast_register_translator(), __login_exec(), action_login(), append_mapping(), ast_cdr_unregister(), ast_channel_register(), ast_channel_unregister(), ast_custom_function_register(), ast_custom_function_unregister(), ast_dnsmgr_lookup(), ast_format_unregister(), ast_image_register(), ast_image_unregister(), ast_moh_destroy(), ast_netsock_bindaddr(), ast_register_application(), ast_register_feature(), ast_rtp_reload(), ast_speech_register(), ast_speech_unregister(), ast_udptl_reload(), ast_unregister_application(), ast_unregister_translator(), builtin_blindtransfer(), cb_extensionstate(), config_text_file_load(), config_text_file_save(), console_verboser(), dnsmgr_refresh(), do_parking_thread(), exit_now(), handle_init_event(), handle_verbose(), load_module(), mgcp_hangup(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), refresh_list(), reload(), reload_config(), reload_firmware(), remap_feature(), set_config(), setformat(), setup_zap(), sipsocket_open(), and ss_thread().

#define VERBOSE_PREFIX_3   " -- "
 

Definition at line 45 of file logger.h.

Referenced by __ast_play_and_record(), __login_exec(), __zt_exception(), agent_call(), agent_read(), agentmonitoroutgoing_exec(), aji_handle_presence(), aji_handle_subscribe(), ast_add_extension2(), ast_aji_disconnect(), ast_app_has_voicemail(), ast_app_inboxcount(), ast_app_messagecount(), ast_context_add_include2(), ast_context_add_switch2(), ast_feature_request_and_dial(), ast_jb_destroy(), ast_moh_start(), ast_record_review(), ast_register_indication_country(), ast_rtp_bridge(), ast_say_number_full_he(), ast_set_indication_country(), ast_streamfile(), ast_unregister_indication_country(), async_wait(), attempt_thread(), attempt_transfer(), begin_dial(), build_device(), build_gateway(), builtin_automonitor(), builtin_blindtransfer(), builtin_disconnect(), check_for_conference(), console_verboser(), create_jb(), find_subchannel_and_lock(), h323_ep_hangup(), handle_command_response(), handle_exec(), handle_frame(), handle_frame_ownerless(), handle_getoption(), handle_register_message(), handle_request(), handle_response(), handle_soft_key_event_message(), handle_stimulus_message(), handle_streamfile(), handle_verbose(), iax2_ack_registry(), iax2_bridge(), iax2_exec(), iax2_hangup(), iax2_prov_app(), iax_provision_reload(), launch_script(), mgcp_answer(), mgcp_call(), mgcp_hangup(), mgcp_indicate(), mgcp_new(), mgcp_request(), mgcp_ss(), misdn_bridge(), moh_alloc(), moh_files_alloc(), moh_files_release(), moh_release(), oh323_call(), park_exec(), parse_register_contact(), parse_srv(), pbx_builtin_goto(), pbx_builtin_waitexten(), pbx_extension_helper(), phone_hangup(), process_ast_dsp(), realtime_exec(), reg_source_db(), reload_config(), run_agi(), send_cwcidspill(), setup_incoming_call(), skinny_call(), skinny_indicate(), skinny_request(), skinny_reset_device(), skinny_session(), skinny_ss(), socket_process(), ss_thread(), transmit_connection_del(), transmit_connection_del_w_params(), transmit_modify_request(), transmit_notify_request(), transmit_notify_request_with_callerid(), try_load_key(), unload_module(), update_registry(), zt_bridge(), zt_call(), zt_handle_event(), zt_hangup(), and zt_read().

#define VERBOSE_PREFIX_4   " > "
 

Definition at line 46 of file logger.h.

Referenced by ast_dnsmgr_lookup(), ast_dnsmgr_release(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_pbx_run_app(), config_odbc_prepare(), console_verboser(), handle_verbose(), and socket_process().


Function Documentation

void void ast_backtrace void   ) 
 

Definition at line 955 of file logger.c.

References ast_calloc, ast_log(), free, and option_debug.

00956 {
00957 #ifdef STACK_BACKTRACES
00958    int count=0, i=0;
00959    void **addresses;
00960    char **strings;
00961 
00962    if ((addresses = ast_calloc(MAX_BACKTRACE_FRAMES, sizeof(*addresses)))) {
00963       count = backtrace(addresses, MAX_BACKTRACE_FRAMES);
00964       if ((strings = backtrace_symbols(addresses, count))) {
00965          if (option_debug)
00966             ast_log(LOG_DEBUG, "Got %d backtrace record%c\n", count, count != 1 ? 's' : ' ');
00967          for (i=0; i < count ; i++) {
00968             if (option_debug)
00969                ast_log(LOG_DEBUG, "#%d: [%08X] %s\n", i, (unsigned int)addresses[i], strings[i]);
00970          }
00971          free(strings);
00972       } else {
00973          if (option_debug)
00974             ast_log(LOG_DEBUG, "Could not allocate memory for backtrace\n");
00975       }
00976       free(addresses);
00977    }
00978 #else
00979 #ifdef Linux
00980    ast_log(LOG_WARNING, "Must compile with 'make dont-optimize' for stack backtraces\n");
00981 #else
00982    ast_log(LOG_WARNING, "Inline stack backtraces are only available on the Linux platform.\n");
00983 #endif
00984 #endif
00985 }

void ast_console_puts const char *  string  ) 
 

write the string to the console, and all attached console clients

Definition at line 757 of file asterisk.c.

References ast_network_puts().

Referenced by chan_misdn_log().

00758 {
00759    fputs(string, stdout);
00760    fflush(stdout);
00761    ast_network_puts(string);
00762 }

void ast_console_puts_mutable const char *  string  ) 
 

log the string to the console, and all attached console clients

Definition at line 734 of file asterisk.c.

References ast_network_puts_mutable().

Referenced by logger_print_normal().

00735 {
00736    fputs(string, stdout);
00737    fflush(stdout);
00738    ast_network_puts_mutable(string);
00739 }

void ast_console_toggle_mute int  fd  ) 
 

mute or unmute a console from logging

Definition at line 699 of file asterisk.c.

References ast_cli(), AST_MAX_CONNECTS, and consoles.

Referenced by handle_logger_mute().

00699                                      {
00700    int x;
00701    for (x = 0;x < AST_MAX_CONNECTS; x++) {
00702       if (fd == consoles[x].fd) {
00703          if (consoles[x].mute) {
00704             consoles[x].mute = 0;
00705             ast_cli(fd, "Console is not muted anymore.\n");
00706          } else {
00707             consoles[x].mute = 1;
00708             ast_cli(fd, "Console is muted.\n");
00709          }
00710          return;
00711       }
00712    }
00713    ast_cli(fd, "Couldn't find remote console.\n");
00714 }

void ast_log int  level,
const char *  file,
int  line,
const char *  function,
const char *  fmt,
  ...
 

This is the standard logger function. Probably the only way you will invoke it would be something like this: ast_log(LOG_WHATEVER, "Problem with the %s Captain. We should get some more. Will %d be enough?\n", "flux capacitor", 10); where WHATEVER is one of ERROR, DEBUG, EVENT, NOTICE, or WARNING depending on which log you wish to output to. These are implemented as macros, that will provide the function with the needed arguments.

Parameters:
level Type of log event
file Will be provided by the LOG_* macro
line Will be provided by the LOG_* macro
function Will be provided by the LOG_* macro
fmt This is what is important. The format is the same as your favorite breed of printf. You know how that works, right? :-)

void ast_queue_log const char *  queuename,
const char *  callid,
const char *  agent,
const char *  event,
const char *  fmt,
  ...
 

void void int ast_register_verbose void(*)(const char *string)  verboser  ) 
 

Definition at line 1040 of file logger.c.

References AST_LIST_INSERT_HEAD, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_malloc, and verb.

Referenced by ast_makesocket(), and show_console().

01041 {
01042    struct verb *verb;
01043 
01044    if (!(verb = ast_malloc(sizeof(*verb))))
01045       return -1;
01046 
01047    verb->verboser = v;
01048 
01049    AST_LIST_LOCK(&verbosers);
01050    AST_LIST_INSERT_HEAD(&verbosers, verb, list);
01051    AST_LIST_UNLOCK(&verbosers);
01052    
01053    return 0;
01054 }

int ast_unregister_verbose void(*)(const char *string)  verboser  ) 
 

Definition at line 1056 of file logger.c.

References AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, free, and verb::verboser.

Referenced by exit_now().

01057 {
01058    struct verb *cur;
01059 
01060    AST_LIST_LOCK(&verbosers);
01061    AST_LIST_TRAVERSE_SAFE_BEGIN(&verbosers, cur, list) {
01062       if (cur->verboser == v) {
01063          AST_LIST_REMOVE_CURRENT(&verbosers, list);
01064          free(cur);
01065          break;
01066       }
01067    }
01068    AST_LIST_TRAVERSE_SAFE_END
01069    AST_LIST_UNLOCK(&verbosers);
01070    
01071    return cur ? 0 : -1;
01072 }

void void ast_verbose const char *  fmt,
  ...
 

This works like ast_log, but prints verbose messages to the console depending on verbosity level set. ast_verbose(VERBOSE_PREFIX_3 "Whatever %s is happening\n", "nothing"); This will print the message to the console if the verbose level is set to a level >= 3 Note the abscence of a comma after the VERBOSE_PREFIX_3. This is important. VERBOSE_PREFIX_1 through VERBOSE_PREFIX_3 are defined.

Send a verbose message (based on verbose level)


Asterisk is a trademark for Digium, inc.. | Edvina.net | Asterisk.org | This documentation was generated with Doxygen