mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
Gut Logger and put it back modular style
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1117 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -395,14 +395,14 @@ SWITCH_DECLARE(switch_channel_state) switch_channel_set_state(switch_channel *ch
|
||||
|
||||
|
||||
if (ok) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s State Change %s -> %s\n", channel->name,
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s State Change %s -> %s\n", channel->name,
|
||||
state_names[last_state], state_names[state]);
|
||||
channel->state = state;
|
||||
if (state < CS_DONE) {
|
||||
switch_core_session_signal_state_change(channel->session);
|
||||
}
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s Invalid State Change %s -> %s\n", channel->name,
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Invalid State Change %s -> %s\n", channel->name,
|
||||
state_names[last_state], state_names[state]);
|
||||
|
||||
//we won't tolerate an invalid state change so we can make sure we are as robust as a nice cup of dark coffee!
|
||||
@@ -601,7 +601,7 @@ SWITCH_DECLARE(switch_status) switch_channel_pre_answer(switch_channel *channel)
|
||||
status = switch_core_session_message_send(uuid, &msg);
|
||||
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Pre-Answer %s!\n", channel->name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Pre-Answer %s!\n", channel->name);
|
||||
switch_channel_set_flag(channel, CF_EARLY_MEDIA);
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ SWITCH_DECLARE(switch_status) switch_channel_answer(switch_channel *channel)
|
||||
|
||||
channel->times.answered = switch_time_now();
|
||||
switch_channel_set_flag(channel, CF_ANSWERED);
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Answer %s!\n", channel->name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Answer %s!\n", channel->name);
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_ANSWER) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_event_set_data(channel, event);
|
||||
switch_event_fire(&event);
|
||||
|
Reference in New Issue
Block a user