Sat Mar 24 23:29:30 2007

Asterisk developer's documentation


logger.h File Reference

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

#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"

Functions

void ast_console_puts (const char *string)
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?", "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 void ast_queue_log (const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt,...) __attribute__((format(printf
void void void int ast_register_verbose (void(*verboser)(const char *string, int opos, int replacelast, int complete))
int ast_unregister_verbose (void(*verboser)(const char *string, int opos, int replacelast, int complete))
void 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.
int ast_verbose_dmesg (void(*verboser)(const char *string, int opos, int replacelast, int complete))


Detailed Description

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

Definition in file logger.h.


Define Documentation

#define __LOG_DEBUG   0
 

Definition at line 83 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 119 of file logger.h.

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

#define __LOG_ERROR   4
 

Definition at line 107 of file logger.h.

Referenced by handle_logger_show_channels(), and make_components().

#define __LOG_EVENT   1
 

Definition at line 89 of file logger.h.

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

#define __LOG_NOTICE   2
 

Definition at line 95 of file logger.h.

Referenced by handle_logger_show_channels(), and make_components().

#define __LOG_VERBOSE   5
 

Definition at line 113 of file logger.h.

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

#define __LOG_WARNING   3
 

Definition at line 101 of file logger.h.

Referenced by handle_logger_show_channels(), and make_components().

#define _A_   __FILE__, __LINE__, __PRETTY_FUNCTION__
 

Definition at line 78 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 84 of file logger.h.

Referenced by __adsi_transmit_messages(), __ast_check_signature_bin(), __ast_pbx_run(), __login_exec(), __oh323_destroy(), __oh323_update_info(), __sip_ack(), __sip_autodestruct(), __sip_destroy(), __sip_reliable_xmit(), __sip_semi_ack(), __zt_exception(), add_realm_authentication(), add_sip_domain(), adsi_begin_download(), adsi_load_session(), adsi_transmit_message_full(), agent_bridgedchannel(), agent_call(), agent_cont_sleep(), agent_hangup(), agent_read(), agent_request(), agent_write(), alarmreceiver_exec(), alloc_sub(), alsa_card_init(), alsa_write(), answer_call(), aopen_handle_escape(), aopen_init(), aopen_read(), aopen_write(), app_exec(), append_transaction(), ast_add_hint(), ast_apply_ha(), ast_bridge_call(), ast_cdr_detach(), ast_cdr_submit_batch(), ast_channel_register(), ast_channel_unregister(), ast_context_create(), ast_control_streamfile(), ast_db_del(), ast_db_get(), ast_dsp_busydetect(), ast_dsp_process(), ast_dsp_set_busy_pattern(), ast_feature_interpret(), ast_io_add(), ast_io_dump(), ast_io_wait(), ast_monitor_start(), ast_monitor_stop(), ast_osp_lookup(), ast_osp_next(), ast_osp_terminate(), ast_osp_validate(), ast_pickup_call(), ast_play_and_record(), ast_queue_frame(), ast_rtcp_read(), ast_rtp_bridge(), 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_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_sip_ouraddrfor(), ast_streamfile(), ast_waitstream(), ast_waitstream_exten(), ast_waitstream_fr(), ast_waitstream_full(), ast_writestream(), attempt_transfer(), available(), background_detect_exec(), bestdata_handle_escape(), bestdata_init(), bestdata_read(), bestdata_write(), build_peer(), build_reply_digest(), build_route(), build_transactions(), builtin_atxfer(), cache_lookup_internal(), cache_save_hint(), callerid_get_dtmf(), cb_events(), chan_ringing(), changethread(), check_auth(), check_availability(), check_beep(), check_key(), check_pendings(), check_user_full(), cleanup_connection(), compare_weight(), conf_add(), conf_del(), conf_run(), config_text_file_load(), connection_made(), create_addr(), create_addr_from_peer(), crypto_load(), del_exec(), deltree_exec(), disa_exec(), do_cdr(), do_chanreads(), do_monitor(), do_parking_thread(), do_proxy_auth(), do_register(), do_register_expire(), do_state_change(), dump_agents(), dundi_answer_entity(), dundi_decrypt(), dundi_encrypt(), dundi_lookup_internal(), dundi_lookup_thread(), dundi_precache_internal(), dundi_precache_thread(), dundi_query_thread(), external_rtp_create(), festival_exec(), find_call(), find_peer(), find_subchannel_and_lock(), forward_message(), function_db_read(), g726_16_open(), g726_16_rewrite(), g726_24_open(), g726_24_rewrite(), g726_32_open(), g726_32_rewrite(), g726_40_open(), g726_40_rewrite(), g726_close(), get_also_info(), get_destination(), get_exec(), get_refer_info(), handle_command_response(), handle_frame(), handle_request(), handle_request_invite(), handle_request_refer(), handle_request_subscribe(), handle_response(), handle_response_invite(), handle_response_register(), hangup_cause2sip(), hangup_connection(), i4l_answer(), i4l_dialdigit(), i4l_handle_escape(), i4l_init(), i4l_read(), i4l_startrec(), iax_provision_version(), ices_exec(), io_grow(), is_our_turn(), launch_netscript(), leave_voicemail(), load_config(), load_module(), load_modules(), local_write(), log_events(), macro_exec(), md5check_exec(), mgcp_answer(), mgcp_hangup(), mgcp_rtp_read(), mgcp_ss(), mgcpsock_read(), misdn_bridge(), misdn_hangup(), misdn_tx2ast_frm(), mkif(), modem_answer(), modem_digit(), modem_hangup(), modem_setup(), monitor_handle_owned(), my_zt_write(), nbs_call(), nbs_hangup(), nbs_xread(), odbc_load_module(), ogg_vorbis_open(), oh323_answer(), oh323_call(), oh323_digit(), oh323_hangup(), oh323_indicate(), oh323_request(), oh323_rtp_read(), osp_build(), ospfinished_exec(), osplookup_exec(), ospnext_exec(), oss_read(), parse_moved_contact(), parse_naptr(), parse_request(), parse_sip_options(), pbx_builtin_gotoif(), pbx_extension_helper(), pbx_substitute_variables_helper_full(), pgsql_log(), phone_answer(), phone_call(), phone_check_exception(), phone_exception(), phone_hangup(), pickup_exec(), pl_odtworz_plik(), play_message_callerid(), play_message_duration(), precache_transactions(), process_message(), process_my_load_module(), process_rfc2833(), process_rfc3389(), process_sdp(), progress(), put_exec(), queue_exec(), rebuild_matrix(), receive_ademco_contact_id(), receive_dtmf_digits(), record_exec(), register_request(), register_verify(), reload_config(), reset_global_eid(), restore_conference(), retrans_pkt(), ring_entry(), ring_one(), rpt_master(), run_agi(), run_externnotify(), run_ras(), save_conference(), scan_service(), sched_settime(), send_child_event(), send_digit(), send_digit_to_chan(), send_dtmf(), send_packet(), send_request(), send_waveform_to_channel(), sendmail(), sendpage(), set_actual_rxgain(), set_actual_txgain(), set_dtmf_payload(), set_local_capabilities(), set_member_paused(), setup_incoming_call(), setup_rtp_connection(), sip_addheader(), sip_alloc(), sip_answer(), sip_call(), sip_devicestate(), sip_do_reload(), sip_dump_history(), sip_getheader(), sip_hangup(), sip_indicate(), sip_park_thread(), sip_rtp_read(), sip_set_rtp_peer(), sipsock_read(), skinny_hangup(), skinny_rtp_read(), skinny_ss(), ss_thread(), store_next(), swap_subs(), testclient_exec(), testserver_exec(), transmit_invite(), transmit_register(), transmit_trunk(), try_load_key(), txtcidname_exec(), unalloc_sub(), update_call_counter(), userevent_exec(), vm_options(), vpb_fixup(), vpb_write(), wait_for_answer(), write_metadata(), zt_answer(), zt_bridge(), zt_call(), zt_digit(), zt_disable_ec(), zt_enable_ec(), zt_fixup(), zt_handle_event(), zt_hangup(), zt_indicate(), zt_new(), zt_read(), zt_setoption(), zt_train_ec(), zt_unlink(), and zt_write().

#define LOG_DTMF   __LOG_DTMF, _A_
 

Definition at line 120 of file logger.h.

Referenced by ast_write().

#define LOG_ERROR   __LOG_ERROR, _A_
 

Definition at line 108 of file logger.h.

Referenced by __agent_start_monitoring(), __ast_pbx_run(), __login_exec(), acf_curl_exec(), acf_cut_exec(), acf_sort_exec(), acf_strftime(), acf_vmcount_exec(), add_realm_authentication(), add_sip_domain(), agent_new(), agi_debug_cli(), alsa_card_init(), alsa_read(), alsa_write(), answer_call(), anti_injection(), app_exec(), aqm_exec(), ast_add_extension2(), ast_cdr_dup(), 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_cli(), ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_create(), ast_custom_function_find(), ast_custom_function_register(), ast_custom_function_unregister(), ast_device_state_engine_init(), ast_func_read(), ast_func_write(), ast_get_group(), ast_monitor_start(), ast_netsock_bindaddr(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_readconfig(), ast_register_application(), ast_register_switch(), ast_rtp_new_with_bindaddr(), ast_rtp_sendcng(), ast_rtp_senddigit(), ast_unregister_application(), ast_unregister_switch(), ast_verbose(), ast_waitfor_n_fd(), ast_waitfor_nandfds(), async_wait(), au_open(), au_rewrite(), background_detect_exec(), build_peer(), build_user(), builtin_automonitor(), builtin_function_regex(), builtin_function_timeout_read(), builtin_function_timeout_write(), callerid_feed(), callerid_read(), callerid_write(), chan_ringing(), chanspy_exec(), check_srcaddr(), complete_context_add_ignorepat(), complete_context_add_include(), complete_context_dont_include(), complete_context_remove_extension(), complete_show_application(), complete_show_dialplan_context(), complete_show_function(), conf_exec(), conf_run(), config_text_file_load(), connection_made(), copy_data_from_queue(), copy_message(), count_exec(), csv_log(), curl_exec(), custom_log(), cut_exec(), del_exec(), deltree_exec(), disa_exec(), dnsmgr_init(), do_monitor(), do_parking_thread(), do_proxy_auth(), do_reload(), dundi_lookup_exec(), dundifunc_read(), enumlookup_exec(), eval_exec(), exec_exec(), execif_exec(), external_rtp_create(), festival_exec(), find_matching_endwhile(), function_fieldqty(), function_iaxpeer(), function_sippeer(), get_callerid(), get_callerid_ast(), get_exec(), get_group(), gosub_exec(), gosubif_exec(), h323_gk_cycle(), handle_message(), handle_request(), handle_request_subscribe(), handle_show_application(), handle_show_applications(), handle_show_hints(), handle_show_switches(), hasvoicemail_exec(), iax2_register(), init_logger(), jb_error_output(), launch_monitor_thread(), listener(), load_config(), load_module(), load_pbx(), local_call(), macro_exec(), macroif_exec(), math_exec(), mixmonitor_thread(), mkbrd(), mkintf(), modem_request(), monitor_handle_notowned(), mssql_connect(), network_verboser(), notify_new_message(), odbc_load_module(), ogg_vorbis_open(), ogg_vorbis_rewrite(), ogg_vorbis_write(), oh323_alloc(), oh323_digit(), oh323_set_rtp_peer(), ospfinished_exec(), osplookup_exec(), ospnext_exec(), page_exec(), parse_config(), parse_gain_value(), pbx_builtin_execiftime(), pbx_builtin_gotoiftime(), pbx_builtin_resetcdr(), pbx_builtin_serialize_variables(), pgsql_log(), phone_request(), playback_exec(), privacy_exec(), process_my_load_module(), process_sdp(), progress(), put_exec(), queue_frame_to_spies(), queue_function_qac(), random_exec(), read_exec(), readfile_exec(), realtime_exec(), realtime_update_exec(), record_exec(), register_verify(), reload_config(), restart_monitor(), retrydial_exec(), return_exec(), rqm_exec(), run_externnotify(), sayunixtime_exec(), send_digit(), senddtmf_exec(), sendtext_exec(), sendurl_exec(), set_config(), setcallerid_exec(), setup_incoming_call(), setup_rtp_connection(), sip_register(), sip_request_call(), sip_sipredirect(), skinny_call(), skinny_req_parse(), sms_exec(), socket_read(), sort_exec(), sound_thread(), soundcard_init(), ss_thread(), strcasestr(), tdd_feed(), tds_load_module(), tds_log(), transfer_exec(), transmit_callinfo(), transmit_callstate(), transmit_connect(), transmit_diallednumber(), transmit_displaymessage(), transmit_displaynotify(), transmit_displaypromptstatus(), transmit_lamp_indication(), transmit_response_with_sdp(), transmit_ringer_mode(), transmit_speaker_mode(), transmit_tone(), txtcidname_exec(), update_call_counter(), userevent_exec(), verbose_exec(), vm_box_exists(), vm_exec(), vmauthenticate(), and zapras_exec().

#define LOG_EVENT   __LOG_EVENT, _A_
 

Definition at line 90 of file logger.h.

Referenced by ast_log(), attempt_thread(), init_logger(), process_message(), scan_service(), sms_process(), and sms_readfile().

#define LOG_NOTICE   __LOG_NOTICE, _A_
 

Definition at line 96 of file logger.h.

Referenced by __ast_decrypt_bin(), __ast_encrypt_bin(), __ast_request_and_dial(), __ast_smoother_feed(), __build_step(), __login_exec(), accept_thread(), adsi_prog(), agent_call(), agent_hangup(), agent_request(), alsa_request(), alsa_write(), app_exec(), apply_outgoing(), aqm_exec(), ast_app_dtget(), ast_app_getvoice(), ast_config_engine_register(), ast_db_get(), ast_dsp_busydetect(), ast_feature_request_and_dial(), AST_LIST_HEAD(), ast_osp_lookup(), ast_read(), ast_rtp_read(), ast_sched_add_variable(), ast_sched_del(), ast_sip_ouraddrfor(), ast_unregister_indication_country(), attempt_reconnect(), attempt_thread(), attempt_transfer(), authenticate(), auto_congest(), builtin_automonitor(), callerid_feed(), chanspy_exec(), check_auth(), check_key(), check_user_full(), cleanup_connection(), config_load(), config_odbc(), convertcap(), copy_header(), copy_message(), crypto_load(), destroy_trans(), do_autokill(), do_monitor(), do_register(), do_reload(), dump_queue(), dundi_encrypt(), dundi_exec(), dundi_helper(), dundi_precache_full(), dundi_precache_internal(), dundi_rexmit(), dundi_send(), enumlookup_exec(), feature_exec_app(), features_alloc(), features_call(), fillin_process(), find_subchannel_and_lock(), find_subchannel_by_name(), get_refer_info(), group_count_function_read(), handle_add_indication(), handle_command_response(), handle_context(), handle_init_event(), handle_macro(), handle_playtones(), handle_request(), handle_request_bye(), handle_request_invite(), handle_request_register(), handle_request_subscribe(), handle_response(), handle_response_invite(), handle_response_peerpoke(), handle_response_register(), handle_root_token(), iax2_destroy(), iax2_read(), iax_provision_reload(), increase_call_count(), ind_load_module(), init_manager(), ivr_dispatch(), join_queue(), leave_queue(), load_config(), load_module(), load_odbc_config(), local_alloc(), lookupblacklist_exec(), measurenoise(), mgcp_call(), mgcp_fixup(), mgcp_postrequest(), mgcp_request(), mgcp_rtp_read(), mgcpsock_read(), misdn_tx2ast_frm(), mixmonitor_exec(), mkif(), moh3_exec(), monitor_handle_owned(), nbs_request(), odbc_obj_connect(), oh323_call(), oh323_request(), oh323_rtp_read(), open_mailbox(), ospfinished_exec(), osplookup_exec(), ospnext_exec(), oss_request(), param_parse(), parse_ok_contact(), parse_register_contact(), pbx_extension_helper(), pbx_substitute_variables_helper_full(), phone_digit(), phone_request(), process_rfc3389(), process_sdp(), read_agent_config(), realtime_exec(), register_verify(), reload(), reload_config(), reload_queues(), ring_entry(), rpt(), rpt_master(), rqm_exec(), set_config(), show_dialplan_helper(), sip_poke_noanswer(), sip_poke_peer(), sip_reg_timeout(), sip_request_call(), sip_reregister(), sipsock_read(), skinny_fixup(), skinny_request(), ss_thread(), start_spying(), 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(), tds_load_module(), testclient_exec(), testserver_exec(), timed_read(), transmit_refer(), transmit_register(), try_load_key(), try_suggested_sip_codec(), unload_module(), update_key(), vm_newuser(), vm_options(), vpb_request(), wait_for_answer(), zt_bridge(), zt_handle_event(), zt_read(), and zt_request().

#define LOG_VERBOSE   __LOG_VERBOSE, _A_
 

Definition at line 114 of file logger.h.

Referenced by ast_verbose(), and unload_module().

#define LOG_WARNING   __LOG_WARNING, _A_
 

Definition at line 102 of file logger.h.

Referenced by __adsi_transmit_messages(), __ast_check_signature(), __ast_check_signature_bin(), __ast_context_destroy(), __ast_decrypt_bin(), __ast_dsp_call_progress(), __ast_encrypt_bin(), __ast_pbx_run(), __ast_request_and_dial(), __ast_sign_bin(), __ast_smoother_feed(), __build_step(), __grab_token(), __load_resource(), __login_exec(), __mgcp_xmit(), __oh323_destroy(), __oh323_new(), __sip_autodestruct(), __sip_destroy(), __sip_pretend_ack(), __sip_xmit(), __transmit_response(), __unload_module(), accept_thread(), acf_curl_exec(), acf_strftime(), ack_trans(), add_agent(), add_blank_header(), add_header(), add_identifier(), add_line(), add_realm_authentication(), add_sdp(), add_sip_domain(), admin_exec(), adpcmtolin_framein(), adsi_begin(), adsi_careful_send(), adsi_get_cpeid(), adsi_get_cpeinfo(), adsi_load_session(), adsi_process(), adsi_prog(), adsi_transmit_message_full(), advanced_options(), agent_answer(), agent_call(), agent_fixup(), agent_new(), agent_request(), agentmonitoroutgoing_exec(), agi_exec(), agi_exec_full(), agi_register(), alarmreceiver_exec(), alawtolin_framein(), alawtoulaw_framein(), alloc_sub(), alsa_card_init(), alsa_indicate(), alsa_new(), alsa_request(), alsa_write(), aopen_answer(), aopen_break(), aopen_dial(), aopen_dialdigit(), aopen_handle_escape(), aopen_hangup(), aopen_init(), aopen_read(), aopen_setdev(), aopen_startrec(), aPGSQL_clear(), aPGSQL_connect(), aPGSQL_debug(), aPGSQL_disconnect(), aPGSQL_fetch(), aPGSQL_query(), aPGSQL_reset(), app_exec(), append_history(), apply_option(), apply_outgoing(), aqm_exec(), ast_add_extension2(), ast_ael_compile(), ast_app_getvoice(), ast_app_parse_options(), ast_append_ha(), ast_async_goto(), ast_autoservice_start(), ast_best_codec(), ast_bridge_call(), ast_cdr_answer(), ast_cdr_busy(), ast_cdr_detach(), ast_cdr_disposition(), ast_cdr_end(), ast_cdr_failed(), ast_cdr_free(), ast_cdr_init(), ast_cdr_register(), ast_cdr_setapp(), ast_cdr_setdestchan(), ast_cdr_start(), ast_cdr_submit_batch(), ast_channel_alloc(), ast_channel_bridge(), ast_channel_free(), ast_channel_make_compatible(), ast_channel_masquerade(), ast_channel_register(), ast_channel_spy_add(), ast_channel_start_silence_generator(), ast_check_timing(), ast_cli_register(), ast_cli_unregister(), ast_codec_get_len(), ast_codec_get_samples(), ast_config_internal_load(), ast_context_create(), ast_context_verify_includes(), ast_db_gettree(), ast_db_put(), ast_dsp_call_progress(), ast_dsp_digitdetect(), ast_dsp_process(), ast_dsp_silence(), ast_dtmf_stream(), ast_filehelper(), ast_find_ourip(), ast_format_register(), ast_format_unregister(), ast_frisolate(), ast_func_read(), ast_func_write(), ast_get_channel_tech(), ast_get_group(), ast_get_indication_tone(), ast_get_indication_zone(), ast_get_ip_or_srv(), ast_hangup(), ast_hint_extension(), ast_iax2_new(), ast_indicate(), ast_io_remove(), ast_ivr_menu_run_internal(), ast_linear_stream(), AST_LIST_HEAD(), ast_loader_register(), ast_loader_unregister(), ast_lock_path(), ast_lookup_iface(), ast_makesocket(), ast_manager_register2(), ast_manager_register_struct(), ast_masq_park_call(), ast_merge_contexts_and_delete(), ast_modem_new(), ast_monitor_change_fname(), ast_monitor_start(), ast_monitor_stop(), ast_netsock_bind(), ast_netsock_bindaddr(), ast_openstream_full(), ast_openvstream(), ast_osp_lookup(), ast_osp_terminate(), ast_osp_validate(), ast_ouraddrfor(), ast_park_call(), ast_parse_allow_disallow(), ast_parseable_goto(), ast_pbx_outgoing_app(), ast_pbx_outgoing_cdr_failed(), ast_pbx_outgoing_exten(), ast_pbx_run_app(), ast_pbx_start(), ast_pickup_call(), ast_play_and_prepend(), ast_play_and_record(), ast_playtones_start(), ast_prod(), ast_pthread_create_stack(), ast_queue_frame(), ast_read(), ast_read_image(), ast_read_textfile(), ast_readaudio_callback(), ast_readconfig(), ast_readfile(), ast_readvideo_callback(), ast_record_review(), ast_register_application(), ast_register_indication(), ast_register_indication_country(), ast_register_switch(), ast_register_translator(), ast_remotecontrol(), ast_request(), ast_resource_exists(), ast_rtcp_new(), ast_rtcp_read(), ast_rtp_bridge(), ast_rtp_offered_from_local(), ast_rtp_proto_register(), ast_rtp_read(), ast_rtp_senddigit(), 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_pt(), ast_say_date_with_format_tw(), ast_search_dns(), ast_set_priority(), ast_slinfactory_feed(), ast_smoother_read(), ast_stopstream(), ast_streamfile(), ast_translate(), ast_translator_build_path(), ast_tryconnect(), ast_unload_resource(), ast_unregister_indication(), ast_unregister_indication_country(), ast_update_use_count(), ast_var_assign(), ast_waitfordigit_full(), ast_waitstream(), ast_waitstream_exten(), ast_waitstream_fr(), ast_waitstream_full(), ast_write(), ast_writefile(), ast_writestream(), ast_yyerror(), async_wait(), attempt_transfer(), attempt_transmit(), au_close(), au_open(), au_read(), au_rewrite(), au_write(), auth_exec(), authenticate(), authenticate_verify(), autoservice_run(), background_detect_exec(), base_encode(), bestdata_answer(), bestdata_break(), bestdata_dialdigit(), bestdata_handle_escape(), bestdata_hangup(), bestdata_init(), bestdata_read(), bestdata_startplay(), bestdata_startrec(), bestdata_write(), build_alias(), build_device(), build_gateway(), build_mapping(), build_peer(), build_rpid(), build_user(), builtin_atxfer(), builtin_automonitor(), builtin_blindtransfer(), builtin_function_checkmd5(), builtin_function_if(), builtin_function_iftime(), builtin_function_math(), builtin_function_md5(), builtin_function_regex(), builtin_function_set(), builtin_function_uridecode(), builtin_function_uriencode(), bump_gains(), calc_cost(), calc_metric(), callerid_feed(), callerid_new(), careful_write(), cb_events(), chan_misdn_log(), chanavail_exec(), chanspy_exec(), check_access(), check_header(), check_via(), clearcbone(), cleardisplay(), clearflag(), cleartimer(), compile_script(), complete_context_add_extension(), complete_context_dont_include(), complete_context_remove_ignorepat(), complete_transfer(), compress_subclass(), conf_add(), conf_del(), conf_exec(), conf_flush(), conf_free(), conf_run(), config_load(), config_odbc(), config_text_file_load(), console_autoanswer(), controlplayback_exec(), copy(), count_exec(), create_addr(), create_dirpath(), create_queue_member(), crypto_load(), csv_log(), curl_exec(), cut_exec(), cut_internal(), dbinit(), del_identifier(), destroy_session(), dial_exec_full(), dictate_exec(), digitcollect(), digitdirect(), directory_exec(), disa_exec(), dns_parse_answer(), do_directory(), do_monitor(), do_parking_thread(), do_reload(), do_waiting(), dump_agents(), dump_queue_members(), dundi_answer_entity(), dundi_discover(), dundi_error_output(), dundi_exec(), dundi_helper(), dundi_lookup_exec(), dundi_lookup_internal(), dundi_query(), dundi_xmit(), dundifunc_read(), eagi_exec(), enum_callback(), enumlookup_exec(), eval_exec(), exec_exec(), execif_exec(), feature_exec_app(), features_new(), festival_exec(), fillin_process(), find_cache(), find_call_locked(), find_desc(), find_transaction(), flash_exec(), forkcdr_exec(), forward_message(), func_check_sipdomain(), func_header_read(), function_db_exists(), function_db_read(), function_db_write(), function_enum(), function_eval(), function_ilink(), function_sipchaninfo_read(), function_txtcidname(), g723_close(), g723_len(), g723_open(), g723_read(), g723_rewrite(), g723_write(), g723tolin_framein(), g726_16_open(), g726_16_rewrite(), g726_24_open(), g726_24_rewrite(), g726_32_open(), g726_32_rewrite(), g726_40_open(), g726_40_rewrite(), g726_close(), g726_read(), g726_write(), g726tolin_framein(), g729_close(), g729_open(), g729_read(), g729_rewrite(), g729_write(), gen_generate(), gen_nextfile(), get_also_info(), get_day(), get_destination(), get_dow(), get_exec(), get_group(), get_in_brackets(), get_input(), get_month(), get_rdnis(), get_refer_info(), get_timerange(), get_token(), get_wait_interval(), getdisplaybyname(), getflagbyname(), getkeybyname(), getstatebyname(), getsubbyname(), gosubif_exec(), goto_line(), goto_line_rel(), group_check_exec(), group_count_exec(), group_function_write(), group_match_count_exec(), group_set_exec(), gsm_close(), gsm_open(), gsm_read(), gsm_rewrite(), gsm_write(), gsmtolin_framein(), h263_close(), h263_open(), h263_read(), h263_rewrite(), h263_write(), handle_add_indication(), handle_command_response(), handle_common_options(), handle_context(), handle_error(), handle_exec(), handle_getoption(), handle_hd_hf(), handle_link_data(), handle_macro(), handle_message(), handle_recordfile(), handle_remote_data(), handle_remove_indication(), handle_request(), handle_request_bye(), handle_request_info(), handle_request_invite(), handle_response(), handle_response_invite(), handle_response_register(), handle_show_indications(), hasvoicemail_exec(), i4l_answer(), i4l_break(), i4l_dial(), i4l_handle_escape(), i4l_hangup(), i4l_init(), i4l_read(), i4l_setdev(), i4l_startrec(), i4l_write(), iax2_ack_registry(), iax2_call(), iax2_canmatch(), iax2_do_register(), iax2_exec(), iax2_exists(), iax2_fixup(), iax2_matchmore(), iax2_poke_peer(), iax2_predestroy(), iax2_register(), iax2_request(), iax2_send(), iax2_setoption(), iax2_trunk_queue(), iax_error_output(), iax_park(), iax_process_template(), iax_template_parse(), ices_exec(), icesencode(), ilbc_close(), ilbc_open(), ilbc_read(), ilbc_rewrite(), ilbc_write(), ilbctolin_framein(), ind_load_module(), indexof(), init_batch(), init_logger_chain(), init_manager(), init_req(), init_resp(), jb_warning_output(), jpeg_read_image(), jpeg_write_image(), launch_netscript(), launch_page(), launch_script(), launch_service(), leave_voicemail(), linear_alloc(), linear_generator(), linear_release(), lintoadpcm_framein(), lintoalaw_framein(), lintog723_framein(), lintog723_frameout(), lintog726_framein(), lintogsm_framein(), lintogsm_frameout(), lintoilbc_framein(), lintoilbc_frameout(), lintolpc10_framein(), lintolpc10_frameout(), lintospeex_framein(), lintoulaw_framein(), listener(), load_config(), load_module(), load_modules(), load_moh_classes(), loadPemCert(), loadPemPrivateKey(), local_answer(), local_ast_moh_start(), local_fixup(), local_new(), local_queue_frame(), lpc10tolin_framein(), macro_exec(), macroif_exec(), make_integer(), make_str(), make_trunk(), math_exec(), md5_exec(), md5check_exec(), memcpy_decrypt(), memcpy_encrypt(), mgcp_call(), mgcp_fixup(), mgcp_indicate(), mgcp_new(), mgcp_request(), mgcp_ss(), mgcp_write(), mgcpsock_read(), milliwatt_exec(), milliwatt_generate(), misdn_answer(), misdn_call(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_init(), misdn_cfg_is_msn_valid(), misdn_digit(), misdn_facility_exec(), misdn_hangup(), misdn_indication(), misdn_new(), misdn_request(), misdn_set_opt_exec(), misdn_tx2ast_frm(), misdn_write(), mixmonitor_exec(), mixmonitor_thread(), mkif(), modem_call(), modem_fixup(), modem_hangup(), modem_request(), modem_setup(), moh0_exec(), moh1_exec(), moh2_exec(), moh_alloc(), moh_files_alloc(), moh_files_generator(), moh_files_release(), moh_generate(), moh_register(), moh_release(), moh_scan_files(), mohalloc(), monitor_handle_owned(), monmp3thread(), mp3_exec(), mp3play(), my_load_module(), nbs_alloc(), nbs_call(), nbs_hangup(), nbs_new(), nbs_xwrite(), NBScat_exec(), NBScatplay(), netconsole(), odbc_load_module(), odbc_obj_connect(), odbc_obj_disconnect(), odbc_prepare_and_execute(), odbc_sanity_check(), odbc_smart_direct_execute(), odbc_smart_execute(), ogg_vorbis_close(), ogg_vorbis_open(), ogg_vorbis_rewrite(), ogg_vorbis_write(), oh323_alloc(), oh323_call(), oh323_fixup(), oh323_hangup(), oh323_indicate(), oh323_request(), oh323_write(), onevent(), op_colon(), op_div(), op_eq(), op_eqtilde(), op_minus(), op_negate(), op_plus(), op_rem(), op_times(), osp_build(), ospfinished_exec(), osplookup_exec(), ospnext_exec(), oss_indicate(), oss_new(), oss_read(), oss_request(), oss_write(), page_exec(), park_exec(), parkandannounce_exec(), parse(), parse_args(), parse_ie(), parse_naptr(), parse_ok_contact(), parse_register_contact(), parse_request(), parse_srv(), pbx_builtin_atimeout(), pbx_builtin_background(), pbx_builtin_dtimeout(), pbx_builtin_execiftime(), pbx_builtin_gotoif(), pbx_builtin_gotoiftime(), pbx_builtin_importvar(), pbx_builtin_pushvar_helper(), pbx_builtin_rtimeout(), pbx_builtin_saynumber(), pbx_builtin_setglobalvar(), pbx_builtin_setlanguage(), pbx_builtin_setvar(), pbx_builtin_setvar_old(), pbx_builtin_waitexten(), pbx_exec(), pbx_extension_helper(), pbx_find_extension(), pbx_findapp(), pbx_findswitch(), pbx_load_module(), pbx_retrieve_variable(), pcm_close(), pcm_open(), pcm_read(), pcm_rewrite(), pcm_write(), peer_set_srcaddr(), PGSQL_exec(), phone_call(), phone_digit(), phone_exception(), phone_hangup(), phone_mini_packet(), phone_new(), phone_read(), phone_setup(), phone_write(), phone_write_buf(), pickup_exec(), play_mailbox_owner(), play_message(), play_message_datetime(), play_record_review(), playback_exec(), playtones_alloc(), playtones_generator(), post_cdr(), powerof(), pqm_exec(), precache_trans(), precache_transactions(), privacy_exec(), process_my_load_module(), process_opcode(), process_returncode(), process_sdp(), process_text_line(), put_exec(), queue_exec(), queue_frame_to_spies(), queue_set_param(), random_exec(), rbi_out(), read_config_maps(), read_exec(), read_samples(), readfile_exec(), realtime_directory(), realtime_multi_odbc(), realtime_odbc(), realtime_peer(), receive_message(), record_exec(), refresh_list(), register_verify(), registry_authrequest(), registry_rerequest(), reload_config(), reload_firmware(), reload_queues(), reply_digest(), reset_conf(), restart_monitor(), restore_conference(), restore_gains(), retrans_pkt(), retrydial_exec(), return_exec(), rpt(), rpt_call(), rpt_exec(), rpt_tele_thread(), rpt_telemetry(), rqm_exec(), run_agi(), run_ras(), safe_append(), save_conference(), saycharstr(), sayfile(), saynum(), scan_service(), scan_thread(), send_callerid(), send_delay(), send_dtmf(), send_packet(), send_request(), send_sound(), send_waveform_to_channel(), send_waveform_to_fd(), senddtmf_exec(), sendimage_exec(), sendmail(), sendpage(), sendtext_exec(), sendurl_exec(), set_config(), set_destination(), set_format(), set_state(), set_timing(), setcallerid_exec(), setcallerid_pres_exec(), setflag(), setformat(), setrdnis_exec(), show_channeltypes(), show_dialplan_helper(), show_file_formats(), showdisplay(), showkeys(), sip_addheader(), sip_alloc(), sip_call(), sip_dtmfmode(), sip_fixup(), sip_getheader(), sip_hangup(), sip_indicate(), sip_new(), sip_notify(), sip_park(), sip_poke_peer(), sip_register(), sip_send_mwi_to_peer(), sip_write(), sipsock_read(), skel_exec(), skinny_call(), skinny_fixup(), skinny_indicate(), skinny_new(), skinny_request(), skinny_ss(), skinny_write(), slinear_close(), slinear_open(), slinear_read(), slinear_rewrite(), slinear_write(), sms_generate(), sms_handleincoming(), sms_readfile(), socket_read(), softhangup_exec(), sort_exec(), sound_thread(), soundcard_init(), soundcard_setinput(), soundcard_setoutput(), soundcard_writeframe(), spawn_dp_lookup(), spawn_mp3(), speex_get_wb_sz_at(), speex_samples(), speextolin_framein(), srv_callback(), starttimer(), statechange_queue(), store_mixer(), str2cause(), stty(), subscript(), system_exec_helper(), tdd_feed(), tdd_new(), tds_log(), telem_lookup(), testclient_exec(), timing_read(), to_integer(), to_string(), tonepair_alloc(), tonepair_generator(), transfer_exec(), transmit_invite(), transmit_notify_with_mwi(), transmit_register(), transmit_request_with_auth(), transmit_response(), transmit_response_with_auth(), transmit_response_with_sdp(), transmit_state_notify(), try_firmware(), try_load_key(), try_transfer(), tvfix(), txtcidname_exec(), ulawtoalaw_framein(), ulawtolin_framein(), unalloc_sub(), unload_module(), update_common_options(), update_header(), update_odbc(), update_registry(), upqm_exec(), used_blocks(), userevent_exec(), verbose_exec(), vm_authenticate(), vm_box_exists(), vm_change_password(), vm_exec(), vm_execmain(), vox_close(), vox_open(), vox_read(), vox_rewrite(), vox_write(), wait_file(), wait_file2(), wait_for_answer(), waitforring_exec(), waitforsilence_exec(), wav_close(), wav_open(), wav_read(), wav_rewrite(), wav_write(), write_header(), writefile(), zapras_exec(), zt_answer(), zt_call(), zt_callwait(), zt_confmute(), zt_digit(), 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.

Referenced by init_logger().


Function Documentation

void ast_console_puts const char *  string  ) 
 

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

Definition at line 495 of file asterisk.c.

References ast_network_puts().

Referenced by ast_log(), chan_misdn_log(), and chan_misdn_trace_call().

00496 {
00497    fputs(string, stdout);
00498    fflush(stdout);
00499    ast_network_puts(string);
00500 }

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?", "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 void ast_queue_log const char *  queuename,
const char *  callid,
const char *  agent,
const char *  event,
const char *  fmt,
  ...
 

void void void int ast_register_verbose void(*)(const char *string, int opos, int replacelast, int complete)  verboser  ) 
 

Definition at line 924 of file logger.c.

References ast_mutex_lock(), ast_mutex_unlock(), list, malloc, msglist::msg, msglist::next, verb::next, verboser, and verb::verboser.

Referenced by ast_makesocket(), and show_console().

00925 {
00926    struct msglist *m;
00927    struct verb *tmp;
00928    /* XXX Should be more flexible here, taking > 1 verboser XXX */
00929    if ((tmp = malloc(sizeof (struct verb)))) {
00930       tmp->verboser = v;
00931       ast_mutex_lock(&msglist_lock);
00932       tmp->next = verboser;
00933       verboser = tmp;
00934       m = list;
00935       while(m) {
00936          /* Send all the existing entries that we have queued (i.e. they're likely to have missed) */
00937          v(m->msg, 0, 0, 1);
00938          m = m->next;
00939       }
00940       ast_mutex_unlock(&msglist_lock);
00941       return 0;
00942    }
00943    return -1;
00944 }

int ast_unregister_verbose void(*)(const char *string, int opos, int replacelast, int complete)  verboser  ) 
 

Definition at line 946 of file logger.c.

References ast_mutex_lock(), ast_mutex_unlock(), free, verb::next, verb::verboser, and verboser.

Referenced by exit_now().

00947 {
00948    int res = -1;
00949    struct verb *tmp, *tmpl=NULL;
00950    ast_mutex_lock(&msglist_lock);
00951    tmp = verboser;
00952    while(tmp) {
00953       if (tmp->verboser == v) {
00954          if (tmpl)
00955             tmpl->next = tmp->next;
00956          else
00957             verboser = tmp->next;
00958          free(tmp);
00959          break;
00960       }
00961       tmpl = tmp;
00962       tmp = tmp->next;
00963    }
00964    if (tmp)
00965       res = 0;
00966    ast_mutex_unlock(&msglist_lock);
00967    return res;
00968 }

void 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)

int ast_verbose_dmesg void(*)(const char *string, int opos, int replacelast, int complete)  verboser  ) 
 

Definition at line 910 of file logger.c.

References ast_mutex_lock(), ast_mutex_unlock(), list, msglist::msg, and msglist::next.

00911 {
00912    struct msglist *m;
00913    ast_mutex_lock(&msglist_lock);
00914    m = list;
00915    while(m) {
00916       /* Send all the existing entries that we have queued (i.e. they're likely to have missed) */
00917       v(m->msg, 0, 0, 1);
00918       m = m->next;
00919    }
00920    ast_mutex_unlock(&msglist_lock);
00921    return 0;
00922 }


Generated on Sat Mar 24 23:29:46 2007 for Asterisk - the Open Source PBX by  doxygen 1.4.6