FS-5529 --resolve

This commit is contained in:
Anthony Minessale 2013-06-20 12:36:30 -05:00
parent 469bcc562d
commit e60f37f651
2 changed files with 13 additions and 0 deletions

View File

@ -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);
};

View File

@ -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 ---- */