提交 e60f37f6 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-5529 --resolve

上级 469bcc56
......@@ -388,6 +388,7 @@ SWITCH_DECLARE(bool) email(char *to, char *from, char *headers = NULL, char *bod
virtual switch_status_t run_dtmf_callback(void *input, switch_input_type_t itype) = 0;
SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg);
};
......
......@@ -1221,6 +1221,18 @@ SWITCH_DECLARE(void) CoreSession::setHangupHook(void *hangup_func) {
switch_core_event_hook_add_state_change(session, hanguphook);
}
SWITCH_DECLARE(void) CoreSession::consoleLog(char *level_str, char *msg)
{
switch_log_level_t level = SWITCH_LOG_DEBUG;
if (level_str) {
level = switch_log_str2level(level_str);
if (level == SWITCH_LOG_INVALID) {
level = SWITCH_LOG_DEBUG;
}
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), level, "%s", switch_str_nil(msg));
}
/* ---- methods not bound to CoreSession instance ---- */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论