#include <stdarg.h>Go to the source code of this file.
Defines | |
| #define | EVENTLOG "event_log" |
| #define | DEBUG_M(a) |
| #define | _A_ __FILE__, __LINE__, __PRETTY_FUNCTION__ |
| #define | __LOG_DEBUG 0 |
| #define | LOG_DEBUG __LOG_DEBUG, _A_ |
| #define | __LOG_EVENT 1 |
| #define | LOG_EVENT __LOG_EVENT, _A_ |
| #define | __LOG_NOTICE 2 |
| #define | LOG_NOTICE __LOG_NOTICE, _A_ |
| #define | __LOG_WARNING 3 |
| #define | LOG_WARNING __LOG_WARNING, _A_ |
| #define | __LOG_ERROR 4 |
| #define | LOG_ERROR __LOG_ERROR, _A_ |
| #define | __LOG_VERBOSE 5 |
| #define | LOG_VERBOSE __LOG_VERBOSE, _A_ |
Functions | |
| void | ast_log (int level, const char *file, int line, const char *function, const char *fmt,...) __attribute__((format(printf |
| Used for sending a log message. More... | |
| void | ast_queue_log (const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt,...) __attribute__((format(printf |
| void | ast_verbose (const char *fmt,...) __attribute__((format(printf |
| Send a verbose message (based on verbose level). More... | |
| 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)) |
| int | ast_verbose_dmesg (void(*verboser)(const char *string, int opos, int replacelast, int complete)) |
| void | ast_console_puts (const char *string) |
|
|
Definition at line 67 of file logger.h. Referenced by ast_log(). |
|
|
|
|
|
Definition at line 73 of file logger.h. Referenced by ast_log(). |
|
|
|
|
|
Definition at line 97 of file logger.h. Referenced by ast_log(). |
|
|
|
|
|
|
|
|
Value: { \
a; \
} |
|
|
Definition at line 23 of file logger.h. Referenced by init_logger(), and reload_logger(). |
|
|
Definition at line 68 of file logger.h. Referenced by ast_append_ha(), ast_apply_ha(), ast_channel_bridge(), ast_channel_masquerade(), ast_channel_register_ex(), ast_channel_unregister(), ast_channel_walk_locked(), ast_context_create(), ast_db_del(), ast_db_get(), ast_do_masquerade(), ast_dsp_process(), ast_get_enum(), ast_get_txt(), ast_hangup(), ast_indicate(), ast_io_add(), ast_io_dump(), ast_io_wait(), ast_ouraddrfor(), ast_pbx_run(), ast_play_and_prepend(), ast_play_and_record(), ast_prod(), ast_queue_frame(), ast_read(), ast_rtcp_read(), ast_rtp_bridge(), ast_rtp_read(), ast_rtp_write(), ast_sched_add(), ast_sched_del(), ast_sched_dump(), ast_sched_runq(), ast_sched_wait(), ast_search_dns(), ast_set_read_format(), ast_set_write_format(), ast_settimeout(), ast_softhangup_nolock(), ast_streamfile(), ast_waitstream(), ast_waitstream_fr(), ast_waitstream_full(), ast_writestream(), callerid_get_dtmf(), load_modules(), and pbx_substitute_variables_helper(). |
|
|
Definition at line 92 of file logger.h. Referenced by ast_add_extension2(), ast_cdr_append(), ast_channel_setoption(), ast_cli(), ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_create(), ast_get_group(), ast_ouraddrfor(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_pbx_run(), ast_register_application(), ast_register_switch(), ast_strcasestr(), ast_unregister_application(), ast_unregister_switch(), ast_verbose(), callerid_feed(), init_logger(), load_pbx(), main(), reload_logger(), and tdd_feed(). |
|
|
Definition at line 74 of file logger.h. Referenced by ast_log(), init_logger(), and reload_logger(). |
|
|
Definition at line 80 of file logger.h. Referenced by __ast_request_and_dial(), ast_app_getvoice(), ast_config_register(), ast_db_get(), ast_get_indication_zone(), ast_io_remove(), ast_read(), ast_rtcp_read(), ast_rtp_read(), ast_rtp_senddigit(), ast_sched_add(), ast_sched_del(), ast_sched_runq(), ast_set_read_format(), ast_set_write_format(), ast_smoother_feed(), ast_unregister_indication_country(), callerid_feed(), init_manager(), pbx_substitute_variables_helper(), read_ast_cust_config(), and tdd_feed(). |
|
|
Definition at line 98 of file logger.h. Referenced by ast_verbose(). |
|
|
|
Definition at line 237 of file asterisk.c. References string. Referenced by ast_log().
|
|
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
|
|
|
|
Definition at line 670 of file logger.c. References ast_mutex_lock, ast_mutex_unlock, malloc, and string. Referenced by main().
00671 {
00672 struct msglist *m;
00673 struct verb *tmp;
00674 /* XXX Should be more flexible here, taking > 1 verboser XXX */
00675 if ((tmp = malloc(sizeof (struct verb)))) {
00676 tmp->verboser = v;
00677 ast_mutex_lock(&msglist_lock);
00678 tmp->next = verboser;
00679 verboser = tmp;
00680 m = list;
00681 while(m) {
00682 /* Send all the existing entries that we have queued (i.e. they're likely to have missed) */
00683 v(m->msg, 0, 0, 1);
00684 m = m->next;
00685 }
00686 ast_mutex_unlock(&msglist_lock);
00687 return 0;
00688 }
00689 return -1;
00690 }
|
|
|
Definition at line 692 of file logger.c. References ast_mutex_lock, ast_mutex_unlock, free, and string.
00693 {
00694 int res = -1;
00695 struct verb *tmp, *tmpl=NULL;
00696 ast_mutex_lock(&msglist_lock);
00697 tmp = verboser;
00698 while(tmp) {
00699 if (tmp->verboser == v) {
00700 if (tmpl)
00701 tmpl->next = tmp->next;
00702 else
00703 verboser = tmp->next;
00704 free(tmp);
00705 break;
00706 }
00707 tmpl = tmp;
00708 tmp = tmp->next;
00709 }
00710 if (tmp)
00711 res = 0;
00712 ast_mutex_unlock(&msglist_lock);
00713 return res;
00714 }
|
|
||||||||||||
|
Send a verbose message (based on verbose level).
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 Referenced by ast_cdr_unregister(), ast_channel_bridge(), ast_channel_register_ex(), ast_channel_unregister(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_create(), ast_format_register(), ast_format_unregister(), ast_frame_dump(), ast_image_register(), ast_image_unregister(), ast_load_resource(), ast_log(), ast_manager_unregister(), ast_module_reload(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_pbx_run(), ast_play_and_prepend(), ast_play_and_record(), ast_register_application(), ast_register_indication_country(), ast_register_translator(), ast_rtp_reload(), ast_save(), ast_set_indication_country(), ast_streamfile(), ast_unregister_application(), ast_unregister_indication_country(), ast_unregister_translator(), init_logger(), init_manager(), load_modules(), load_pbx(), main(), pbx_builtin_setvar_helper(), and reload_logger(). |
|
|
Definition at line 656 of file logger.c. References ast_mutex_lock, ast_mutex_unlock, and string.
00657 {
00658 struct msglist *m;
00659 ast_mutex_lock(&msglist_lock);
00660 m = list;
00661 while(m) {
00662 /* Send all the existing entries that we have queued (i.e. they're likely to have missed) */
00663 v(m->msg, 0, 0, 1);
00664 m = m->next;
00665 }
00666 ast_mutex_unlock(&msglist_lock);
00667 return 0;
00668 }
|
1.2.15