FreeSWITCH API Documentation
1.7.0
|
Go to the source code of this file.
Data Structures | |
struct | switch_log_binding |
Macros | |
#define | do_mods (LOG_QUEUE && THREAD_RUNNING) |
Typedefs | |
typedef struct switch_log_binding | switch_log_binding_t |
Variables | |
static const char * | LEVELS [] |
static switch_memory_pool_t * | LOG_POOL = NULL |
static switch_log_binding_t * | BINDINGS = NULL |
static switch_mutex_t * | BINDLOCK = NULL |
static switch_queue_t * | LOG_QUEUE = NULL |
static int8_t | THREAD_RUNNING = 0 |
static uint8_t | MAX_LEVEL = 0 |
static int | mods_loaded = 0 |
static int | console_mods_loaded = 0 |
static switch_bool_t | COLORIZE = SWITCH_FALSE |
static const char * | COLORS [] |
static switch_thread_t * | thread |
#define do_mods (LOG_QUEUE && THREAD_RUNNING) |
Definition at line 331 of file switch_log.c.
Referenced by switch_log_vprintf().
typedef struct switch_log_binding switch_log_binding_t |
Definition at line 55 of file switch_log.c.
|
static |
Definition at line 281 of file switch_log.c.
References BINDLOCK, switch_log_binding::function, switch_log_binding::level, switch_log_node_t::level, LOG_QUEUE, switch_log_binding::next, SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, switch_log_node_free(), switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), switch_queue_pop(), SWITCH_STATUS_SUCCESS, and THREAD_RUNNING.
Referenced by switch_log_init().
switch_status_t switch_log_bind_logger | ( | switch_log_function_t | function, |
switch_log_level_t | level, | ||
switch_bool_t | is_console | ||
) |
Definition at line 245 of file switch_log.c.
References BINDLOCK, console_mods_loaded, switch_log_binding::function, switch_log_binding::is_console, switch_log_binding::level, LOG_POOL, MAX_LEVEL, mods_loaded, switch_log_binding::next, switch_assert, switch_core_alloc, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_MEMERR, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_log_init | ( | switch_memory_pool_t * | pool, |
switch_bool_t | colorize | ||
) |
Definition at line 506 of file switch_log.c.
References BINDLOCK, COLORIZE, LOG_POOL, LOG_QUEUE, log_thread(), pool, switch_assert, switch_cond_next(), switch_core_get_console(), SWITCH_CORE_QUEUE_LEN, switch_mutex_init(), SWITCH_MUTEX_NESTED, switch_queue_create(), SWITCH_STATUS_SUCCESS, switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_stacksize_set(), SWITCH_TRUE, thread, and THREAD_RUNNING.
const char* switch_log_level2str | ( | switch_log_level_t | level | ) |
Definition at line 149 of file switch_log.c.
References switch_log_binding::level, LEVELS, and SWITCH_LOG_DEBUG.
Referenced by switch_log_vprintf().
|
static |
Definition at line 88 of file switch_log.c.
References switch_assert, switch_queue_trypop(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_log_node_dup(), and switch_log_vprintf().
void switch_log_printf | ( | switch_text_channel_t | channel, |
const char * | file, | ||
const char * | func, | ||
int | line, | ||
const char * | userdata, | ||
switch_log_level_t | level, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 321 of file switch_log.c.
References switch_log_vprintf().
Referenced by log_thread(), and switch_core_memory_reclaim_logger().
switch_log_level_t switch_log_str2level | ( | const char * | str | ) |
Definition at line 186 of file switch_log.c.
References switch_log_binding::level, LEVELS, switch_is_number(), and SWITCH_LOG_INVALID.
Referenced by switch_log_str2mask().
uint32_t switch_log_str2mask | ( | const char * | str | ) |
Definition at line 157 of file switch_log.c.
References switch_log_binding::level, switch_assert, SWITCH_LOG_INVALID, switch_log_str2level(), and switch_separate_string().
switch_status_t switch_log_unbind_logger | ( | switch_log_function_t | function | ) |
Definition at line 218 of file switch_log.c.
References BINDLOCK, console_mods_loaded, switch_log_binding::function, switch_log_binding::is_console, mods_loaded, switch_log_binding::next, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
void switch_log_vprintf | ( | switch_text_channel_t | channel, |
const char * | file, | ||
const char * | func, | ||
int | line, | ||
const char * | userdata, | ||
switch_log_level_t | level, | ||
const char * | fmt, | ||
va_list | ap | ||
) |
Definition at line 332 of file switch_log.c.
References switch_log_node_t::channel, COLORIZE, COLORS, console_mods_loaded, switch_log_node_t::content, switch_log_node_t::data, switch_runtime::debug_level, do_mods, switch_log_node_t::file, switch_log_node_t::func, switch_runtime::hard_log_level, switch_log_node_t::level, switch_log_node_t::line, LOG_QUEUE, switch_core_session::loglevel, MAX_LEVEL, memset(), runtime, switch_log_node_t::slevel, switch_assert, SWITCH_CHANNEL_ID_EVENT, SWITCH_CHANNEL_ID_LOG_CLEAN, SWITCH_CHANNEL_ID_SESSION, switch_core_data_channel(), switch_core_session_get_uuid(), switch_cut_path(), switch_event_add_header(), switch_event_add_header_string(), switch_event_create, switch_event_fire, SWITCH_EVENT_LOG, switch_event_running(), SWITCH_LOG_INVALID, switch_log_level2str(), switch_log_node_alloc(), switch_log_node_free(), SWITCH_LOG_UNINIT, switch_micro_time_now(), switch_queue_trypush(), switch_safe_free, SWITCH_SEQ_DEFAULT_COLOR, switch_set_string, switch_snprintf(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_time_exp_lt(), switch_vasprintf(), switch_log_node_t::timestamp, switch_time_exp_t::tm_hour, switch_time_exp_t::tm_mday, switch_time_exp_t::tm_min, switch_time_exp_t::tm_mon, switch_time_exp_t::tm_sec, switch_time_exp_t::tm_usec, switch_time_exp_t::tm_year, switch_log_node_t::userdata, and zstr.
Referenced by switch_log_printf().
|
static |
Definition at line 58 of file switch_log.c.
|
static |
Definition at line 59 of file switch_log.c.
Referenced by log_thread(), switch_log_bind_logger(), switch_log_init(), and switch_log_unbind_logger().
|
static |
Definition at line 68 of file switch_log.c.
Referenced by switch_log_init(), and switch_log_vprintf().
|
static |
Definition at line 83 of file switch_log.c.
Referenced by switch_log_vprintf().
|
static |
Definition at line 67 of file switch_log.c.
Referenced by switch_log_bind_logger(), switch_log_unbind_logger(), and switch_log_vprintf().
|
static |
Definition at line 36 of file switch_log.c.
Referenced by switch_log_level2str(), and switch_log_str2level().
|
static |
Definition at line 57 of file switch_log.c.
Referenced by switch_log_bind_logger(), and switch_log_init().
|
static |
Definition at line 60 of file switch_log.c.
Referenced by log_thread(), switch_log_init(), switch_log_shutdown(), and switch_log_vprintf().
|
static |
Definition at line 65 of file switch_log.c.
Referenced by switch_log_bind_logger(), and switch_log_vprintf().
|
static |
Definition at line 66 of file switch_log.c.
Referenced by switch_log_bind_logger(), and switch_log_unbind_logger().
|
static |
Definition at line 279 of file switch_log.c.
Referenced by check_queue(), launch_collect_thread(), switch_core_launch_thread(), switch_core_session_launch_thread(), switch_core_session_thread(), switch_core_session_thread_launch(), switch_ivr_broadcast_in_thread(), switch_ivr_enterprise_originate(), switch_log_init(), switch_log_shutdown(), switch_system_thread(), switch_xml_free_in_thread(), and task_thread_loop().
|
static |
Definition at line 64 of file switch_log.c.
Referenced by log_thread(), switch_log_init(), and switch_log_shutdown().