<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][14510] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=14510">14510</a></dd>
<dt>Author</dt> <dd>mrene</dd>
<dt>Date</dt> <dd>2009-08-13 16:24:51 -0500 (Thu, 13 Aug 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Per-call logging, part two</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_commandsmod_commandsc">freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_conferencemod_conferencec">freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_curlmod_curlc">freeswitch/trunk/src/mod/applications/mod_curl/mod_curl.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_dptoolsmod_dptoolsc">freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_easyroutemod_easyroutec">freeswitch/trunk/src/mod/applications/mod_easyroute/mod_easyroute.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_esfmod_esfc">freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_faxmod_faxc">freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_fifomod_fifoc">freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_fsvmod_fsvc">freeswitch/trunk/src/mod/applications/mod_fsv/mod_fsv.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_lcrmod_lcrc">freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_limitmod_limitc">freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_memcachemod_memcachec">freeswitch/trunk/src/mod/applications/mod_memcache/mod_memcache.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_nibblebillmod_nibblebillc">freeswitch/trunk/src/mod/applications/mod_nibblebill/mod_nibblebill.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_rssmod_rssc">freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_soundtouchmod_soundtouchcpp">freeswitch/trunk/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_spymod_spyc">freeswitch/trunk/src/mod/applications/mod_spy/mod_spy.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_stressmod_stresscpp">freeswitch/trunk/src/mod/applications/mod_stress/mod_stress.cpp</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_t38gatewaymod_t38gatewayc">freeswitch/trunk/src/mod/applications/mod_t38gateway/mod_t38gateway.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_vmdmod_vmdc">freeswitch/trunk/src/mod/applications/mod_vmd/mod_vmd.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_voicemailmod_voicemailc">freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_core_ioc">freeswitch/trunk/src/switch_core_io.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_core_memoryc">freeswitch/trunk/src/switch_core_memory.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunksrcmodapplicationsmod_commandsmod_commandsc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -1590,7 +1590,7 @@
</span><span class="cx">         switch_assert(mydata != NULL);
</span><span class="cx">
</span><span class="cx">         if ((argc = switch_separate_string(mydata, ' ', argv, sizeof(argv) / sizeof(argv[0]))) < 3 || !argv[0]) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "-ERR INVALID ARGS!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "-ERR INVALID ARGS!\n");
</ins><span class="cx">                 return SWITCH_STATUS_SUCCESS;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1605,12 +1605,12 @@
</span><span class="cx">                         if ((mto = atoi(argv[4] + 1)) > 0) {
</span><span class="cx">                                 to = switch_epoch_time_now(NULL) + mto;
</span><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID Timeout!\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID Timeout!\n");
</ins><span class="cx">                                 goto done;
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         if ((to = atoi(argv[4])) < switch_epoch_time_now(NULL)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID Timeout!\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID Timeout!\n");
</ins><span class="cx">                                 to = 0;
</span><span class="cx">                                 goto done;
</span><span class="cx">                         }
</span><span class="lines">@@ -2309,7 +2309,7 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ((extension = switch_caller_extension_new(caller_session, app_name, arg)) == 0) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Memory Error!\n");
</ins><span class="cx">                         abort();
</span><span class="cx">                 }
</span><span class="cx">                 switch_caller_extension_add_application(caller_session, extension, app_name, arg);
</span><span class="lines">@@ -2909,7 +2909,7 @@
</span><span class="cx">                 holder.delim = ",";
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        /* switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SQL: %s.\n", sql); */
</del><ins>+        /* switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "SQL: %s.\n", sql); */
</ins><span class="cx">         
</span><span class="cx">         if (!strcasecmp(as, "delim") || !strcasecmp(as, "csv")) {
</span><span class="cx">                 if (switch_strlen_zero(holder.delim)) {
</span><span class="lines">@@ -3104,7 +3104,7 @@
</span><span class="cx">                                 channel = switch_core_session_get_channel(psession);
</span><span class="cx">
</span><span class="cx">                                 if (switch_strlen_zero(var_name)) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No variable name specified.\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
</ins><span class="cx">                                         stream->write_function(stream, "-ERR No variable specified\n");
</span><span class="cx">                                 } else {
</span><span class="cx">                                         switch_channel_set_variable(channel, var_name, var_value);
</span><span class="lines">@@ -3154,7 +3154,7 @@
</span><span class="cx">                                         *var_value++ = '\0';
</span><span class="cx">                                 }
</span><span class="cx">                                 if (switch_strlen_zero(var_name)) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No variable name specified.\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
</ins><span class="cx">                                         stream->write_function(stream, "-ERR No variable specified\n");
</span><span class="cx">                                 } else {
</span><span class="cx">                                         switch_channel_set_variable(channel, var_name, var_value);
</span><span class="lines">@@ -3199,7 +3199,7 @@
</span><span class="cx">
</span><span class="cx">                                 if (switch_strlen_zero(var_name)) {
</span><span class="cx">                                         stream->write_function(stream, "-ERR No variable name specified!\n");
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No variable name specified.\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
</ins><span class="cx">                                 } else {
</span><span class="cx">                                         var_value = switch_channel_get_variable(channel, var_name);
</span><span class="cx">                                         if (var_value != NULL) {
</span><span class="lines">@@ -3383,9 +3383,9 @@
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Executing command: %s\n", cmd);
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Executing command: %s\n", cmd);
</ins><span class="cx"> if (switch_system(cmd, SWITCH_TRUE) < 0) {
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Failed to execute command: %s\n", cmd);
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Failed to execute command: %s\n", cmd);
</ins><span class="cx"> }
</span><span class="cx"> stream->write_function(stream, "+OK\n");
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_conferencemod_conferencec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -1639,14 +1639,14 @@
</span><span class="cx">                         }
</span><span class="cx">                         
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Empty transfer string [%s]\n", (char *) action->data);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Empty transfer string [%s]\n", (char *) action->data);
</ins><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to allocate memory to duplicate transfer data.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Unable to allocate memory to duplicate transfer data.\n");
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Transfering to: %s, %s, %s\n", exten, dialplan, context);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Transfering to: %s, %s, %s\n", exten, dialplan, context);
</ins><span class="cx">         
</span><span class="cx">         switch_ivr_session_transfer(member->session,
</span><span class="cx">                                                                 exten, dialplan, context);
</span><span class="lines">@@ -1683,19 +1683,19 @@
</span><span class="cx">                         }
</span><span class="cx">                         
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Empty execute app string [%s]\n", (char *) action->data);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Empty execute app string [%s]\n", (char *) action->data);
</ins><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to allocate memory to duplicate execute_app data.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Unable to allocate memory to duplicate execute_app data.\n");
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!app) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to find application.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Unable to find application.\n");
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Execute app: %s, %s\n", app, arg);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Execute app: %s, %s\n", app, arg);
</ins><span class="cx">
</span><span class="cx">         channel = switch_core_session_get_channel(member->session);
</span><span class="cx">         
</span><span class="lines">@@ -2001,11 +2001,11 @@
</span><span class="cx">         flush_len = switch_samples_per_packet(member->conference->rate, member->conference->interval) * 10;
</span><span class="cx">
</span><span class="cx">         if (switch_core_timer_init(&timer, member->conference->timer_name, interval, tsamples, NULL) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Timer Setup Failed. Conference Cannot Start\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Timer Setup Failed. Conference Cannot Start\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Setup timer %s success interval: %u samples: %u\n",
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Setup timer %s success interval: %u samples: %u\n",
</ins><span class="cx">                                          member->conference->timer_name, interval, tsamples);
</span><span class="cx">
</span><span class="cx">         if (!restarting) {
</span><span class="lines">@@ -2026,7 +2026,7 @@
</span><span class="cx">                 /* build a digit stream object */
</span><span class="cx">                 if (member->conference->dtmf_parser != NULL
</span><span class="cx">                         && switch_ivr_digit_stream_new(member->conference->dtmf_parser, &member->digit_stream) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Danger Will Robinson, there is no digit parser stream object\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Danger Will Robinson, there is no digit parser stream object\n");
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ((call_list = switch_channel_get_private(channel, "_conference_autocall_list_"))) {
</span><span class="lines">@@ -2118,12 +2118,12 @@
</span><span class="cx">                 if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
</span><span class="cx">                         /* test to see if outbound channel has answered */
</span><span class="cx">                         if (switch_channel_test_flag(channel, CF_ANSWERED) && !switch_test_flag(member->conference, CFLAG_ANSWERED)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Outbound conference channel answered, setting CFLAG_ANSWERED\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Outbound conference channel answered, setting CFLAG_ANSWERED\n");
</ins><span class="cx">                                 switch_set_flag(member->conference, CFLAG_ANSWERED);
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         if (switch_test_flag(member->conference, CFLAG_ANSWERED) && !switch_channel_test_flag(channel, CF_ANSWERED)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CLFAG_ANSWERED set, answering inbound channel\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "CLFAG_ANSWERED set, answering inbound channel\n");
</ins><span class="cx">                                 switch_channel_answer(channel);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -2155,7 +2155,7 @@
</span><span class="cx">                                 param = caller_action->data;
</span><span class="cx">                         }
</span><span class="cx"> #ifdef INTENSE_DEBUG
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG,
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session),
</ins><span class="cx">                                                          SWITCH_LOG_INFO,
</span><span class="cx">                                                          "executing caller control '%s' param '%s' on call '%u, %s\n",
</span><span class="cx">                                                          caller_action->fndesc->key,
</span><span class="lines">@@ -2312,7 +2312,7 @@
</span><span class="cx">         switch_clear_flag_locked(member, MFLAG_RUNNING);
</span><span class="cx">         switch_core_timer_destroy(&timer);
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel leaving conference, cause: %s\n",
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "Channel leaving conference, cause: %s\n",
</ins><span class="cx">                                          switch_channel_cause2str(switch_channel_get_cause(channel)));
</span><span class="cx">
</span><span class="cx">         /* if it's an outbound channel, store the release cause in the conference struct, we might need it */
</span><span class="lines">@@ -2730,13 +2730,13 @@
</span><span class="cx">         }
</span><span class="cx">         /* Setup a memory pool to use. */
</span><span class="cx">         if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Pool Failure\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Pool Failure\n");
</ins><span class="cx">                 status = SWITCH_STATUS_MEMERR;
</span><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">         /* Create a node object */
</span><span class="cx">         if (!(fnode = switch_core_alloc(pool, sizeof(*fnode)))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Alloc Failure\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Alloc Failure\n");
</ins><span class="cx">                 switch_core_destroy_memory_pool(&pool);
</span><span class="cx">                 status = SWITCH_STATUS_MEMERR;
</span><span class="cx">                 goto done;
</span><span class="lines">@@ -2754,7 +2754,7 @@
</span><span class="cx">         }
</span><span class="cx">         fnode->pool = pool;
</span><span class="cx">         /* Queue the node */
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Queueing file '%s' for play\n", file);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Queueing file '%s' for play\n", file);
</ins><span class="cx">         switch_mutex_lock(member->control_mutex);
</span><span class="cx">         for (nptr = member->fnode; nptr && nptr->next; nptr = nptr->next);
</span><span class="cx">         if (nptr) {
</span><span class="lines">@@ -2793,13 +2793,13 @@
</span><span class="cx">
</span><span class="cx">         /* Setup a memory pool to use. */
</span><span class="cx">         if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Pool Failure\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Pool Failure\n");
</ins><span class="cx">                 return SWITCH_STATUS_MEMERR;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /* Create a node object */
</span><span class="cx">         if (!(fnode = switch_core_alloc(pool, sizeof(*fnode)))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Alloc Failure\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Alloc Failure\n");
</ins><span class="cx">                 switch_core_destroy_memory_pool(&pool);
</span><span class="cx">                 return SWITCH_STATUS_MEMERR;
</span><span class="cx">         }
</span><span class="lines">@@ -2813,7 +2813,7 @@
</span><span class="cx">                 if (switch_core_speech_open(&member->lsh, conference->tts_engine, conference->tts_voice,
</span><span class="cx">                                                                         conference->rate, conference->interval, &flags, switch_core_session_get_pool(member->session)) !=
</span><span class="cx">                         SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module [%s]!\n", conference->tts_engine);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Invalid TTS module [%s]!\n", conference->tts_engine);
</ins><span class="cx">                         return SWITCH_STATUS_FALSE;
</span><span class="cx">                 }
</span><span class="cx">                 member->sh = &member->lsh;
</span><span class="lines">@@ -4335,7 +4335,7 @@
</span><span class="cx">         conference_name = conference->name;
</span><span class="cx">
</span><span class="cx">         if (switch_thread_rwlock_tryrdlock(conference->rwlock) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Read Lock Fail\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Read Lock Fail\n");
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -4354,7 +4354,7 @@
</span><span class="cx">         /* establish an outbound call leg */
</span><span class="cx">
</span><span class="cx">         if (switch_ivr_originate(session, &peer_session, cause, bridgeto, timeout, NULL, cid_name, cid_num, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot create outgoing channel, cause: %s\n", switch_channel_cause2str(*cause));
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot create outgoing channel, cause: %s\n", switch_channel_cause2str(*cause));
</ins><span class="cx">                 if (caller_channel) {
</span><span class="cx">                         switch_channel_hangup(caller_channel, *cause);
</span><span class="cx">                 }
</span><span class="lines">@@ -4367,7 +4367,7 @@
</span><span class="cx">
</span><span class="cx">         /* make sure the conference still exists */
</span><span class="cx">         if (!switch_test_flag(conference, CFLAG_RUNNING)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Conference is gone now, nevermind..\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Conference is gone now, nevermind..\n");
</ins><span class="cx">                 if (caller_channel) {
</span><span class="cx">                         switch_channel_hangup(caller_channel, SWITCH_CAUSE_NO_ROUTE_DESTINATION);
</span><span class="cx">                 }
</span><span class="lines">@@ -4387,7 +4387,7 @@
</span><span class="cx">
</span><span class="cx">                 /* build an extension name object */
</span><span class="cx">                 if ((extension = switch_caller_extension_new(peer_session, conference_name, conference_name)) == 0) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Memory Error!\n");
</ins><span class="cx">                         status = SWITCH_STATUS_MEMERR;
</span><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="lines">@@ -4516,7 +4516,7 @@
</span><span class="cx">         switch_threadattr_detach_set(thd_attr, 1);
</span><span class="cx">         switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
</span><span class="cx">         switch_thread_create(&thread, thd_attr, conference_outcall_run, call, pool);
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Launching BG Thread for outcall\n");
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Launching BG Thread for outcall\n");
</ins><span class="cx">
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -4775,12 +4775,12 @@
</span><span class="cx">                                                          "L16",
</span><span class="cx">                                                          NULL, read_impl.actual_samples_per_second, read_impl.microseconds_per_packet / 1000,
</span><span class="cx">                                                          1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, member->pool) == SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG,
</ins><span class="cx">                                                  "Raw Codec Activation Success L16@%uhz 1 channel %dms\n",
</span><span class="cx">                                                  read_impl.actual_samples_per_second, read_impl.microseconds_per_packet / 1000);
</span><span class="cx">
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n",
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n",
</ins><span class="cx">                                                  read_impl.actual_samples_per_second, read_impl.microseconds_per_packet / 1000);
</span><span class="cx">
</span><span class="cx">                 goto done;
</span><span class="lines">@@ -4796,7 +4796,7 @@
</span><span class="cx">                 if (switch_resample_create(&member->read_resampler,
</span><span class="cx">                                                                  read_impl.actual_samples_per_second,
</span><span class="cx">                                                                  conference->rate, member->frame_size, SWITCH_RESAMPLE_QUALITY, 1) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Unable to create resampler!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Unable to create resampler!\n");
</ins><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -4807,7 +4807,7 @@
</span><span class="cx">                 /* Setup an audio buffer for the resampled audio */
</span><span class="cx">                 if (switch_buffer_create_dynamic(&member->resample_buffer, CONF_DBLOCK_SIZE, CONF_DBUFFER_SIZE, CONF_DBUFFER_MAX)
</span><span class="cx">                         != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error Creating Audio Buffer!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Memory Error Creating Audio Buffer!\n");
</ins><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -4820,24 +4820,24 @@
</span><span class="cx">                                                          conference->rate,
</span><span class="cx">                                                          read_impl.microseconds_per_packet / 1000,
</span><span class="cx">                                                          1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, member->pool) == SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG,
</ins><span class="cx">                                                  "Raw Codec Activation Success L16@%uhz 1 channel %dms\n",
</span><span class="cx">                                                  conference->rate, read_impl.microseconds_per_packet / 1000);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n",
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n",
</ins><span class="cx">                                                  conference->rate, read_impl.microseconds_per_packet / 1000);
</span><span class="cx">                 goto codec_done2;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /* Setup an audio buffer for the incoming audio */
</span><span class="cx">         if (switch_buffer_create_dynamic(&member->audio_buffer, CONF_DBLOCK_SIZE, CONF_DBUFFER_SIZE, CONF_DBUFFER_MAX) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error Creating Audio Buffer!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Memory Error Creating Audio Buffer!\n");
</ins><span class="cx">                 goto codec_done1;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /* Setup an audio buffer for the outgoing audio */
</span><span class="cx">         if (switch_buffer_create_dynamic(&member->mux_buffer, CONF_DBLOCK_SIZE, CONF_DBUFFER_SIZE, CONF_DBUFFER_MAX) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error Creating Audio Buffer!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Memory Error Creating Audio Buffer!\n");
</ins><span class="cx">                 goto codec_done1;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -4881,20 +4881,20 @@
</span><span class="cx">
</span><span class="cx">         /* Save the original read codec. */
</span><span class="cx">         if (!(read_codec = switch_core_session_get_read_codec(session))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Channel has no media!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Channel has no media!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Invalid arguments\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Invalid arguments\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         mydata = switch_core_session_strdup(session, data);
</span><span class="cx">
</span><span class="cx">         if (!mydata) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Pool Failure\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Pool Failure\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -4916,7 +4916,7 @@
</span><span class="cx">                 if ((bridgeto = strchr(mydata, ':'))) {
</span><span class="cx">                         *bridgeto++ = '\0';
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Config Error!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Config Error!\n");
</ins><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -4955,7 +4955,7 @@
</span><span class="cx">
</span><span class="cx">         /* Open the config from the xml registry */
</span><span class="cx">         if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, params))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf_name);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf_name);
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -4981,7 +4981,7 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ((conference = conference_find(conf_name))) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Conference %s already exists!\n", conf_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Conference %s already exists!\n", conf_name);
</ins><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -5065,7 +5065,7 @@
</span><span class="cx">
</span><span class="cx">                 /* acquire a read lock on the thread so it can't leave without us */
</span><span class="cx">                 if (switch_thread_rwlock_tryrdlock(conference->rwlock) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Read Lock Fail\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Read Lock Fail\n");
</ins><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">                 rl++;
</span><span class="lines">@@ -5107,7 +5107,7 @@
</span><span class="cx">                                 }
</span><span class="cx">                                 
</span><span class="cx">                                 if (pstatus != SWITCH_STATUS_SUCCESS && pstatus != SWITCH_STATUS_BREAK) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot ask the user for a pin, ending call");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Cannot ask the user for a pin, ending call");
</ins><span class="cx">                                         switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="lines">@@ -5149,7 +5149,7 @@
</span><span class="cx">
</span><span class="cx">                 /* don't allow more callers if the conference is locked, unless we invited them */
</span><span class="cx">                 if (switch_test_flag(conference, CFLAG_LOCKED) && enforce_security) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Conference %s is locked.\n", conf_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Conference %s is locked.\n", conf_name);
</ins><span class="cx">                         if (conference->locked_sound) {
</span><span class="cx">                                 /* Answer the channel */
</span><span class="cx">                                 switch_channel_answer(channel);
</span><span class="lines">@@ -5163,7 +5163,7 @@
</span><span class="cx">                  * max_members limit
</span><span class="cx">                  */
</span><span class="cx">                 if ((conference->max_members > 0) && (conference->count >= conference->max_members)) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Conference %s is full.\n", conf_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Conference %s is full.\n", conf_name);
</ins><span class="cx">                         if (conference->maxmember_sound) {
</span><span class="cx">                                 /* Answer the channel */
</span><span class="cx">                                 switch_channel_answer(channel);
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_curlmod_curlc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_curl/mod_curl.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_curl/mod_curl.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_curl/mod_curl.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -307,7 +307,7 @@
</span><span class="cx">         switch_goto_status(SWITCH_STATUS_SUCCESS, done);
</span><span class="cx">         
</span><span class="cx"> usage:
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", SYNTAX);
</ins><span class="cx">         switch_goto_status(status, done);
</span><span class="cx">         
</span><span class="cx"> done:
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_dptoolsmod_dptoolsc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", SCHED_HEARTBEAT_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", SCHED_HEARTBEAT_SYNTAX);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", HEARTBEAT_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", HEARTBEAT_SYNTAX);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">                 && (argc = switch_separate_string(lbuf, ' ', argv, (sizeof(argv) / sizeof(argv[0]))))) {
</span><span class="cx">                 switch_core_session_execute_exten(session, argv[0], argv[1], argv[2]);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", EXE_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", EXE_SYNTAX);
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx"> SWITCH_STANDARD_APP(mkdir_function)
</span><span class="cx"> {
</span><span class="cx">         switch_dir_make_recursive(data, SWITCH_DEFAULT_DIR_PERMS, switch_core_session_get_pool(session));
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s MKDIR: %s\n", switch_channel_get_name(switch_core_session_get_channel(session)), data);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s MKDIR: %s\n", switch_channel_get_name(switch_core_session_get_channel(session)), data);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #define SOFT_HOLD_SYNTAX "<unhold key> [<moh_a>] [<moh_b>]"
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">                 && (argc = switch_separate_string(lbuf, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) >= 1) {
</span><span class="cx">                 switch_ivr_soft_hold(session, argv[0], argv[1], argv[2]);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", SOFT_HOLD_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", SOFT_HOLD_SYNTAX);
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx">
</span><span class="cx">                 if (strchr(argv[2], 'a')) {
</span><span class="cx">                         if ((bind_flags & SBF_EXEC_BLEG)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</ins><span class="cx">                         } else {
</span><span class="cx">                                 bind_flags |= SBF_EXEC_ALEG;
</span><span class="cx">                         }
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx">
</span><span class="cx">                 if (strchr(argv[2], 'b')) {
</span><span class="cx">                         if ((bind_flags & SBF_EXEC_ALEG)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</ins><span class="cx">                         } else {
</span><span class="cx">                                 bind_flags |= SBF_EXEC_BLEG;
</span><span class="cx">                         }
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx">
</span><span class="cx">                 if (strchr(argv[2], 'a')) {
</span><span class="cx">                         if ((bind_flags & SBF_EXEC_BLEG)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</ins><span class="cx">                         } else {
</span><span class="cx">                                 bind_flags |= SBF_EXEC_ALEG;
</span><span class="cx">                         }
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx">
</span><span class="cx">                 if (strchr(argv[2], 'o')) {
</span><span class="cx">                         if ((bind_flags & SBF_EXEC_BLEG) || (bind_flags & SBF_EXEC_ALEG) || (bind_flags & SBF_EXEC_SAME)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</ins><span class="cx">                         } else {
</span><span class="cx">                                 bind_flags |= SBF_EXEC_OPPOSITE;
</span><span class="cx">                         }
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx">
</span><span class="cx">                 if (strchr(argv[2], 's')) {
</span><span class="cx">                         if ((bind_flags & SBF_EXEC_BLEG) || (bind_flags & SBF_EXEC_ALEG) || (bind_flags & SBF_EXEC_SAME)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
</ins><span class="cx">                         } else {
</span><span class="cx">                                 bind_flags |= SBF_EXEC_SAME;
</span><span class="cx">                         }
</span><span class="lines">@@ -263,10 +263,10 @@
</span><span class="cx">                 }
</span><span class="cx">                 
</span><span class="cx">                 if (switch_ivr_bind_dtmf_meta_session(session, kval, bind_flags, argv[3]) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Bind Error!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Bind Error!\n");
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", BIND_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", BIND_SYNTAX);
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -286,7 +286,7 @@
</span><span class="cx">                                         uuid = argv[1];
</span><span class="cx">                                         bleg = SWITCH_TRUE;
</span><span class="cx">                                 } else {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", INTERCEPT_SYNTAX);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", INTERCEPT_SYNTAX);
</ins><span class="cx">                                         return;
</span><span class="cx">                                 }
</span><span class="cx">                         } else {
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", INTERCEPT_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", INTERCEPT_SYNTAX);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #define MAX_SPY 3000
</span><span class="lines">@@ -324,7 +324,7 @@
</span><span class="cx"> SWITCH_STANDARD_APP(eavesdrop_function)
</span><span class="cx"> {
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", eavesdrop_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", eavesdrop_SYNTAX);
</ins><span class="cx">         } else {
</span><span class="cx">                 switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx">                 const char *require_group = switch_channel_get_variable(channel, "eavesdrop_require_group");
</span><span class="lines">@@ -347,7 +347,7 @@
</span><span class="cx">                                 e_data.total = 0;
</span><span class="cx">                                 switch_core_db_exec(db, sql, e_callback, &e_data, &errmsg);
</span><span class="cx">                                 if (errmsg) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error: %s\n", errmsg);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Error: %s\n", errmsg);
</ins><span class="cx">                                         switch_core_db_free(errmsg);
</span><span class="cx">                                         if ((file = switch_channel_get_variable(channel, "eavesdrop_indicate_failed"))) {
</span><span class="cx">                                                 switch_ivr_play_file(session, NULL, file, NULL);
</span><span class="lines">@@ -359,13 +359,13 @@
</span><span class="cx">                                         for (x = 0; x < e_data.total && switch_channel_ready(channel); x++) {
</span><span class="cx">                                                 /* If we have a group and 1000 concurrent calls, we will flood the logs. This check avoids this */
</span><span class="cx">                                                 if ( !require_group )
</span><del>-                                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Spy: %s\n", e_data.uuid_list[x]);
</del><ins>+                                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Spy: %s\n", e_data.uuid_list[x]);
</ins><span class="cx">                                                 if ((file = switch_channel_get_variable(channel, "eavesdrop_indicate_new"))) {
</span><span class="cx">                                                         switch_ivr_play_file(session, NULL, file, NULL);
</span><span class="cx">                                                 }
</span><span class="cx">                                                 if ((status = switch_ivr_eavesdrop_session(session, e_data.uuid_list[x], require_group, ED_DTMF)) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                                         if (status != SWITCH_STATUS_BREAK) {
</span><del>-                                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Spy: %s Failed\n", e_data.uuid_list[x]);
</del><ins>+                                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Spy: %s Failed\n", e_data.uuid_list[x]);
</ins><span class="cx">                                                                 if ((file = switch_channel_get_variable(channel, "eavesdrop_indicate_failed"))) {
</span><span class="cx">                                                                         switch_ivr_play_file(session, NULL, file, NULL);
</span><span class="cx">                                                                 }
</span><span class="lines">@@ -398,7 +398,7 @@
</span><span class="cx"> SWITCH_STANDARD_APP(three_way_function)
</span><span class="cx"> {
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", threeway_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", threeway_SYNTAX);
</ins><span class="cx">         } else {
</span><span class="cx">                 switch_ivr_eavesdrop_session(session, data, NULL, ED_MUX_READ | ED_MUX_WRITE);
</span><span class="cx">         }
</span><span class="lines">@@ -461,7 +461,7 @@
</span><span class="cx">                                 if (argc > 2) {
</span><span class="cx">                                         cause = switch_channel_str2cause(argv[2]);
</span><span class="cx">                                 }
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call failed acl check for ip %s on list %s\n", argv[0], argv[1]);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Call failed acl check for ip %s on list %s\n", argv[0], argv[1]);
</ins><span class="cx">                                 switch_channel_hangup(channel, cause);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -497,7 +497,7 @@
</span><span class="cx">                                                 switch_core_session_rwunlock(b_session);
</span><span class="cx">                                         }
</span><span class="cx">                                 } else {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No B-leg present.\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "No B-leg present.\n");
</ins><span class="cx">                                 }
</span><span class="cx">                                 if (both) {
</span><span class="cx">                                         switch_ivr_session_transfer(session, argv[1], argv[2], argv[3]);
</span><span class="lines">@@ -506,7 +506,7 @@
</span><span class="cx">                                 switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]);
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No extension specified.\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No extension specified.\n");
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -529,7 +529,7 @@
</span><span class="cx">
</span><span class="cx">                         switch_ivr_schedule_transfer(when, switch_core_session_get_uuid(session), argv[1], argv[2], argv[3]);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Args\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid Args\n");
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -562,7 +562,7 @@
</span><span class="cx">
</span><span class="cx">                         switch_ivr_schedule_hangup(when, switch_core_session_get_uuid(session), cause, bleg);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No time specified.\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No time specified.\n");
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -598,7 +598,7 @@
</span><span class="cx">
</span><span class="cx">                         switch_ivr_schedule_broadcast(when, switch_core_session_get_uuid(session), argv[1], flags);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Args\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid Args\n");
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -657,12 +657,12 @@
</span><span class="cx">         switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data) || !(mydata = switch_core_session_strdup(session, data))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID ARGS!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID ARGS!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ((argc = switch_separate_string(mydata, ' ', argv, sizeof(argv) / sizeof(argv[0]))) < 2) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID ARGS!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID ARGS!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -726,7 +726,7 @@
</span><span class="cx">         char *var, *val = NULL;
</span><span class="cx">         
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No variable name specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
</ins><span class="cx">         } else {
</span><span class="cx">                 switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx">                 char *expanded = NULL;
</span><span class="lines">@@ -745,7 +745,7 @@
</span><span class="cx">                         expanded = switch_channel_expand_variables(channel, val);
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s SET [%s]=[%s]\n", switch_channel_get_name(channel), var, expanded ? expanded : "UNDEF");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s SET [%s]=[%s]\n", switch_channel_get_name(channel), var, expanded ? expanded : "UNDEF");
</ins><span class="cx">                 switch_channel_set_variable_var_check(channel, var, expanded, SWITCH_FALSE);
</span><span class="cx">
</span><span class="cx">                 if (expanded && expanded != val) {
</span><span class="lines">@@ -759,7 +759,7 @@
</span><span class="cx">         char *var, *val = NULL;
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No variable name specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
</ins><span class="cx">         } else {
</span><span class="cx">                 var = strdup(data);
</span><span class="cx">                 switch_assert(var);
</span><span class="lines">@@ -772,7 +772,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SET GLOBAL [%s]=[%s]\n", var, val ? val : "UNDEF");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "SET GLOBAL [%s]=[%s]\n", var, val ? val : "UNDEF");
</ins><span class="cx">                 switch_core_set_variable(var, val);
</span><span class="cx">                 free(var);
</span><span class="cx">         }
</span><span class="lines">@@ -786,7 +786,7 @@
</span><span class="cx">         caller_profile = switch_channel_get_caller_profile(switch_core_session_get_channel(session));
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No variable name specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
</ins><span class="cx">         } else {
</span><span class="cx">                 name = switch_core_session_strdup(session, data);
</span><span class="cx">                 val = strchr(name, '=');
</span><span class="lines">@@ -798,7 +798,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SET_PROFILE_VAR [%s]=[%s]\n", name, val ? val : "UNDEF");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "SET_PROFILE_VAR [%s]=[%s]\n", name, val ? val : "UNDEF");
</ins><span class="cx">
</span><span class="cx">                 if (!strcasecmp(name, "dialplan")) {
</span><span class="cx">                         caller_profile->dialplan = val;
</span><span class="lines">@@ -862,7 +862,7 @@
</span><span class="cx">         int local = 1;
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No variable name specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
</ins><span class="cx">         } else {
</span><span class="cx">                 exports = switch_channel_get_variable(channel, SWITCH_EXPORT_VARS_VARIABLE);
</span><span class="cx">                 var = switch_core_session_strdup(session, data);
</span><span class="lines">@@ -883,7 +883,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "EXPORT %s[%s]=[%s]\n", local ? "" : "(REMOTE ONLY) ", var_name ? var_name : "",
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "EXPORT %s[%s]=[%s]\n", local ? "" : "(REMOTE ONLY) ", var_name ? var_name : "",
</ins><span class="cx">                                                  val ? val : "UNDEF");
</span><span class="cx">                 switch_channel_set_variable(channel, var, val);
</span><span class="cx">
</span><span class="lines">@@ -905,9 +905,9 @@
</span><span class="cx"> SWITCH_STANDARD_APP(unset_function)
</span><span class="cx"> {
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No variable name specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "UNSET [%s]\n", (char *) data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "UNSET [%s]\n", (char *) data);
</ins><span class="cx">                 switch_channel_set_variable(switch_core_session_get_channel(session), data, NULL);
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -929,7 +929,7 @@
</span><span class="cx">                         ltype = SWITCH_LOG_DEBUG;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, ltype, "%s\n", log_str);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), ltype, "%s\n", log_str);
</ins><span class="cx">                 switch_safe_free(level);
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -943,7 +943,7 @@
</span><span class="cx">                 switch_channel_event_set_data(switch_core_session_get_channel(session), event);
</span><span class="cx">                 switch_event_serialize(event, &buf, SWITCH_FALSE);
</span><span class="cx">                 switch_assert(buf);
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "CHANNEL_DATA:\n%s\n", buf);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "CHANNEL_DATA:\n%s\n", buf);
</ins><span class="cx">                 switch_event_destroy(&event);
</span><span class="cx">                 free(buf);
</span><span class="cx">         }
</span><span class="lines">@@ -1013,7 +1013,7 @@
</span><span class="cx">         switch_caller_profile_t *caller_profile = switch_channel_get_caller_profile(switch_core_session_get_channel(session));
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No privacy mode specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No privacy mode specified.\n");
</ins><span class="cx">         } else {
</span><span class="cx">                 switch_set_flag(caller_profile, SWITCH_CPF_SCREEN);
</span><span class="cx">
</span><span class="lines">@@ -1030,9 +1030,9 @@
</span><span class="cx">                         switch_clear_flag(caller_profile, SWITCH_CPF_HIDE_NAME);
</span><span class="cx">                         switch_clear_flag(caller_profile, SWITCH_CPF_HIDE_NUMBER);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID privacy mode specified. Use a valid mode [no|yes|name|full|number].\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID privacy mode specified. Use a valid mode [no|yes|name|full|number].\n");
</ins><span class="cx">                 }
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set Privacy to %s [%d]\n", data, caller_profile->flags);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Set Privacy to %s [%d]\n", data, caller_profile->flags);
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1050,7 +1050,7 @@
</span><span class="cx">
</span><span class="cx">                 switch_time_exp_lt(&tm, switch_micro_time_now());
</span><span class="cx">                 switch_strftime(date, &retsize, sizeof(date), argv[1], &tm);
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SET [%s]=[%s]\n", argv[0], date);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "SET [%s]=[%s]\n", argv[0], date);
</ins><span class="cx">                 switch_channel_set_variable(switch_core_session_get_channel(session), argv[0], date);
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -1182,7 +1182,7 @@
</span><span class="cx">         switch_ivr_action_t action = SWITCH_IVR_ACTION_NOOP;
</span><span class="cx">
</span><span class="cx">         if (param != NULL) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "menu_handler '%s'\n", param);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "menu_handler '%s'\n", param);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return action;
</span><span class="lines">@@ -1224,15 +1224,15 @@
</span><span class="cx">                                                 switch_ivr_menu_execute(session, menu_stack, (char*)name, NULL);
</span><span class="cx">                                                 switch_ivr_menu_stack_free(menu_stack);
</span><span class="cx">                                         } else {
</span><del>-                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to create menu\n");
</del><ins>+                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Unable to create menu\n");
</ins><span class="cx">                                         }
</span><span class="cx">                                 } else {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to find menu\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Unable to find menu\n");
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         switch_xml_free(cxml);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", ivr_cf_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Open of %s failed\n", ivr_cf_name);
</ins><span class="cx">                 }
</span><span class="cx">                 switch_event_destroy(&params);
</span><span class="cx">         }
</span><span class="lines">@@ -1272,9 +1272,9 @@
</span><span class="cx">
</span><span class="cx"> SWITCH_STANDARD_APP(system_session_function)
</span><span class="cx"> {
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Executing command: %s\n", data);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Executing command: %s\n", data);
</ins><span class="cx">         if (switch_system(data, SWITCH_TRUE) < 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Failed to execute command: %s\n", data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Failed to execute command: %s\n", data);
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1287,12 +1287,12 @@
</span><span class="cx">         int hits = 1;
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data) || !(mydata = switch_core_session_strdup(session, data))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID ARGS!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID ARGS!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ((argc = switch_separate_string(mydata, ' ', argv, sizeof(argv) / sizeof(argv[0]))) < 2) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID ARGS!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID ARGS!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1302,12 +1302,12 @@
</span><span class="cx">                         if ((mto = atol(argv[3] + 1)) > 0) {
</span><span class="cx">                                 to = switch_epoch_time_now(NULL) + mto;
</span><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID Timeout!\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID Timeout!\n");
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         if ((to = atol(argv[3])) < switch_epoch_time_now(NULL)) {
</span><span class="cx">                                 if (to >= 1) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID Timeout!\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID Timeout!\n");
</ins><span class="cx">                                 }
</span><span class="cx">                                 to = 0;
</span><span class="cx">                         }
</span><span class="lines">@@ -1321,14 +1321,14 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Enabling tone detection '%s' '%s'\n", argv[0], argv[1]);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Enabling tone detection '%s' '%s'\n", argv[0], argv[1]);
</ins><span class="cx">
</span><span class="cx">         switch_ivr_tone_detect_session(session, argv[0], argv[1], argv[2], to, hits, argv[4], argv[5], NULL);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> SWITCH_STANDARD_APP(stop_fax_detect_session_function)
</span><span class="cx"> {
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Disabling tone detection\n");
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Disabling tone detection\n");
</ins><span class="cx">         switch_ivr_stop_tone_detect_session(session);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1386,7 +1386,7 @@
</span><span class="cx">                         if (!strcasecmp(terminators, "none")) {
</span><span class="cx">                                 terminators = NULL;
</span><span class="cx">                         }
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digit %c\n", dtmf->digit);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Digit %c\n", dtmf->digit);
</ins><span class="cx">
</span><span class="cx">                         for (p = terminators; p && *p; p++) {
</span><span class="cx">                                 if (*p == dtmf->digit) {
</span><span class="lines">@@ -1409,7 +1409,7 @@
</span><span class="cx">         switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No timeout specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No timeout specified.\n");
</ins><span class="cx">         } else {
</span><span class="cx">                 uint32_t ms = atoi(data);
</span><span class="cx">                 char buf[10];
</span><span class="lines">@@ -1444,14 +1444,14 @@
</span><span class="cx">         switch_input_args_t args = { 0 };
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data) || !(mydata = switch_core_session_strdup(session, data))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Params!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid Params!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         argc = switch_separate_string(mydata, '|', argv, sizeof(argv) / sizeof(argv[0]));
</span><span class="cx">
</span><span class="cx">         if (argc == 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Params!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid Params!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         } else if (argc == 1) {
</span><span class="cx">                 text = argv[0];
</span><span class="lines">@@ -1482,7 +1482,7 @@
</span><span class="cx">                 if (!text) {
</span><span class="cx">                         text = "NULL";
</span><span class="cx">                 }
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Params! [%s][%s][%s]\n", engine, voice, text);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid Params! [%s][%s][%s]\n", engine, voice, text);
</ins><span class="cx">                 switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1531,7 +1531,7 @@
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="cx">                                 if ((extension = switch_caller_extension_new(peer_session, app, app_arg)) == 0) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Memory Error!\n");
</ins><span class="cx">                                         abort();
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="lines">@@ -1564,7 +1564,7 @@
</span><span class="cx">                         switch_stream_handle_t stream = { 0 };
</span><span class="cx">                         SWITCH_STANDARD_STREAM(stream);
</span><span class="cx">                         switch_api_execute("uuid_bridge", id, NULL, &stream);
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\nHangup Command uuid_bridge(%s):\n%s\n", id, switch_str_nil((char *) stream.data));
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "\nHangup Command uuid_bridge(%s):\n%s\n", id, switch_str_nil((char *) stream.data));
</ins><span class="cx">                         switch_safe_free(stream.data);
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -1659,7 +1659,7 @@
</span><span class="cx">         if (!switch_strlen_zero(data) && (mydata = switch_core_session_strdup(session, data))) {
</span><span class="cx">                 argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No arguments specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No arguments specified.\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1723,7 +1723,7 @@
</span><span class="cx">         if (!switch_strlen_zero(data) && (mydata = switch_core_session_strdup(session, data))) {
</span><span class="cx">                 argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No arguments specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No arguments specified.\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1799,7 +1799,7 @@
</span><span class="cx">                 
</span><span class="cx">                 switch_ivr_say(session, argv[3], argv[0], argv[1], argv[2], &args);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", SAY_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", SAY_SYNTAX);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> }
</span><span class="lines">@@ -1823,7 +1823,7 @@
</span><span class="cx">                 
</span><span class="cx">                 lang = switch_channel_get_variable(channel, "language");
</span><span class="cx">
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Execute %s(%s) lang %s\n", macro, switch_str_nil(mdata), switch_str_nil(lang));
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Execute %s(%s) lang %s\n", macro, switch_str_nil(mdata), switch_str_nil(lang));
</ins><span class="cx">
</span><span class="cx">                 args.input_callback = on_dtmf;
</span><span class="cx">                 
</span><span class="lines">@@ -1885,7 +1885,7 @@
</span><span class="cx">         switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data) || !(tone_script = switch_core_session_strdup(session, data))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Params!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid Params!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1950,7 +1950,7 @@
</span><span class="cx">         if (!switch_strlen_zero(data) && (mydata = switch_core_session_strdup(session, data))) {
</span><span class="cx">                 argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No file specified.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No file specified.\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -2081,7 +2081,7 @@
</span><span class="cx">                                 switch_ivr_media(switch_core_session_get_uuid(session), SMF_REBRIDGE);
</span><span class="cx">                                 switch_channel_set_flag(caller_channel, CF_PROXY_MODE);
</span><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel is already up, delaying proxy mode 'till both legs are answered.\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Channel is already up, delaying proxy mode 'till both legs are answered.\n");
</ins><span class="cx">                                 switch_channel_set_variable(caller_channel, "bypass_media_after_bridge", "true");
</span><span class="cx">                                 switch_channel_set_variable(caller_channel, SWITCH_BYPASS_MEDIA_VARIABLE, NULL);
</span><span class="cx">                                 switch_channel_clear_flag(caller_channel, CF_PROXY_MODE);
</span><span class="lines">@@ -2090,7 +2090,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Originate Failed. Cause: %s\n", switch_channel_cause2str(cause));
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Originate Failed. Cause: %s\n", switch_channel_cause2str(cause));
</ins><span class="cx">
</span><span class="cx">                 /* no answer is *always* a reason to continue */
</span><span class="cx">                 if (cause == SWITCH_CAUSE_NO_ANSWER || cause == SWITCH_CAUSE_NO_USER_RESPONSE || cause == SWITCH_CAUSE_ORIGINATOR_CANCEL) {
</span><span class="lines">@@ -2112,12 +2112,12 @@
</span><span class="cx">                         switch_snprintf(cause_num, sizeof(cause_num), "%u", cause);
</span><span class="cx">                         
</span><span class="cx">                         if (failure_causes && !(switch_stristr(cause_str, failure_causes) || strstr(failure_causes, cause_num))) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Failiure causes [%s]: Cause: %s\n", failure_causes, cause_str);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Failiure causes [%s]: Cause: %s\n", failure_causes, cause_str);
</ins><span class="cx">                                 return;
</span><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         if (continue_on_fail && (switch_true(continue_on_fail) || switch_stristr(cause_str, continue_on_fail) || strstr(continue_on_fail, cause_num))) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Continue on fail [%s]: Cause: %s\n", continue_on_fail, cause_str);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Continue on fail [%s]: Cause: %s\n", continue_on_fail, cause_str);
</ins><span class="cx">                                 return;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -2362,7 +2362,7 @@
</span><span class="cx">         switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "as_channel", "true");
</span><span class="cx">
</span><span class="cx">         if (switch_xml_locate_user("id", user, domain, NULL, &xml, &x_domain, &x_user, &x_group, params) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", user, domain);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", user, domain);
</ins><span class="cx">                 cause = SWITCH_CAUSE_SUBSCRIBER_ABSENT;
</span><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="lines">@@ -2422,7 +2422,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!dest) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No dial-string available, please check your user directory.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No dial-string available, please check your user directory.\n");
</ins><span class="cx">                 cause = SWITCH_CAUSE_MANDATORY_IE_MISSING;
</span><span class="cx">         } else {
</span><span class="cx">                 const char *varval;
</span><span class="lines">@@ -2477,7 +2477,7 @@
</span><span class="cx">
</span><span class="cx">                 switch_snprintf(stupid, sizeof(stupid), "user/%s", user);
</span><span class="cx">                 if (switch_stristr(stupid, d_dest)) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Waddya Daft? You almost called '%s' in an infinate loop!\n", stupid);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Waddya Daft? You almost called '%s' in an infinate loop!\n", stupid);
</ins><span class="cx">                         cause = SWITCH_CAUSE_INVALID_IE_CONTENTS;
</span><span class="cx">                 } else if (switch_ivr_originate(session, new_session, &cause, d_dest, timelimit, NULL,
</span><span class="cx">                                                                  cid_name_override, cid_num_override, NULL, var_event, myflags) == SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -2578,7 +2578,7 @@
</span><span class="cx">
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", WAIT_FOR_SILENCE_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", WAIT_FOR_SILENCE_SYNTAX);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static switch_status_t event_chat_send(const char *proto, const char *from, const char *to, const char *subject,
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_easyroutemod_easyroutec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_easyroute/mod_easyroute.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_easyroute/mod_easyroute.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_easyroute/mod_easyroute.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 route_lookup(destnum, &results, noat, seperator);
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "EASY ROUTE DEST: [%s]\n", results.dialstring);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "EASY ROUTE DEST: [%s]\n", results.dialstring);
</ins><span class="cx">                 switch_channel_set_variable(channel, "easy_destnum", destnum);
</span><span class="cx">                 switch_channel_set_variable(channel, "easy_dialstring", results.dialstring);
</span><span class="cx">                 switch_channel_set_variable(channel, "easy_group", results.group);
</span><span class="lines">@@ -327,7 +327,7 @@
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><span class="cx">         
</span><span class="cx">         if (session) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This function cannot be called from the dialplan.\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "This function cannot be called from the dialplan.\n");
</ins><span class="cx">                 status = SWITCH_STATUS_FALSE;
</span><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="lines">@@ -353,7 +353,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 if (argc == 2) {
</span><span class="cx">                         if (!strcasecmp(argv[1], "noat")) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Entering noat.\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Entering noat.\n");
</ins><span class="cx">                                 noat = 1;
</span><span class="cx"> } else if (!strcasecmp(argv[1], "seperator")) {
</span><span class="cx"> if (argc == 3){
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_esfmod_esfc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -124,13 +124,13 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (switch_socket_create(&socket, AF_INET, SOCK_DGRAM, 0, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error 1\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket Error 1\n");
</ins><span class="cx">                 goto fail;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (switch_sockaddr_info_get(&control_packet_addr, mcast_ip, SWITCH_UNSPEC,
</span><span class="cx">                                                                  mcast_control_port, 0, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error 3\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket Error 3\n");
</ins><span class="cx">                 goto fail;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -162,9 +162,9 @@
</span><span class="cx">                                                                          1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
</span><span class="cx">                                                                          NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                 switch_core_session_set_read_codec(session, &codec);
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec Activation Success\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Codec Activation Success\n");
</ins><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec Activation Fail\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Codec Activation Fail\n");
</ins><span class="cx">                                 goto fail;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">                 if (!(rtp_port = switch_rtp_request_port(esf_broadcast_ip))) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP Port Error\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "RTP Port Error\n");
</ins><span class="cx">                         goto fail;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -192,14 +192,14 @@
</span><span class="cx">                                                                          (switch_rtp_flag_t) flags, "soft", &err, switch_core_session_get_pool(session));
</span><span class="cx">
</span><span class="cx">                 if (!switch_rtp_ready(rtp_session)) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP Error\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "RTP Error\n");
</ins><span class="cx">                         goto fail;
</span><span class="cx">                 }
</span><span class="cx">         } else if (ready == SEND_TYPE_NOMEDIA) {
</span><span class="cx">                 switch_yield(10000);
</span><span class="cx">         } else if (ready == SEND_TYPE_RAW) {
</span><span class="cx">                 if (switch_sockaddr_info_get(&audio_addr, mcast_ip, SWITCH_UNSPEC, mcast_port, 0, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error 2\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket Error 2\n");
</ins><span class="cx">                         goto fail;
</span><span class="cx">                 }
</span><span class="cx">         }
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_faxmod_faxc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -169,33 +169,33 @@
</span><span class="cx">         if (result == T30_ERR_OK) {
</span><span class="cx">
</span><span class="cx">                 if (pvt->app_mode == FUNCTION_TX) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Fax successfully sent.\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Fax successfully sent.\n");
</ins><span class="cx">                 } else if (pvt->app_mode == FUNCTION_RX) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Fax successfully received.\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Fax successfully received.\n");
</ins><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Fax successfully managed. How ?\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Fax successfully managed. How ?\n");
</ins><span class="cx">                 }
</span><span class="cx">                 switch_channel_set_variable(channel, "fax_success", "1");
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Fax processing not successful - result (%d) %s.\n", result,
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Fax processing not successful - result (%d) %s.\n", result,
</ins><span class="cx">                                                  t30_completion_code_to_str(result));
</span><span class="cx">                 switch_channel_set_variable(channel, "fax_success", "0");
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Remote station id: %s\n", far_ident);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local station id: %s\n", local_ident);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Pages transferred: %i\n",
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Remote station id: %s\n", far_ident);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Local station id: %s\n", local_ident);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Pages transferred: %i\n",
</ins><span class="cx">                 pvt->app_mode == FUNCTION_TX ? t.pages_rx : t.pages_rx);
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Total fax pages: %i\n", t.pages_in_file);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Image resolution: %ix%i\n", t.x_resolution, t.y_resolution);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Transfer Rate: %i\n", t.bit_rate);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Total fax pages: %i\n", t.pages_in_file);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Image resolution: %ix%i\n", t.x_resolution, t.y_resolution);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Transfer Rate: %i\n", t.bit_rate);
</ins><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ECM status %s\n", (t.error_correcting_mode) ? "on" : "off");
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "remote country: %s\n", switch_str_nil(t30_get_rx_country(s)));
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "remote vendor: %s\n", switch_str_nil(t30_get_rx_vendor(s)));
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "remote model: %s\n", switch_str_nil(t30_get_rx_model(s)));
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "ECM status %s\n", (t.error_correcting_mode) ? "on" : "off");
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "remote country: %s\n", switch_str_nil(t30_get_rx_country(s)));
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "remote vendor: %s\n", switch_str_nil(t30_get_rx_vendor(s)));
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "remote model: %s\n", switch_str_nil(t30_get_rx_model(s)));
</ins><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "==============================================================================\n");
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "==============================================================================\n");
</ins><span class="cx">
</span><span class="cx">         /*
</span><span class="cx">         Set our channel variables
</span><span class="lines">@@ -286,7 +286,7 @@
</span><span class="cx">
</span><span class="cx">                 memset(fax, 0, sizeof(fax_state_t));
</span><span class="cx">                 if (fax_init(fax, pvt->caller) == NULL) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot initialize my fax structs\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot initialize my fax structs\n");
</ins><span class="cx">                         return SWITCH_STATUS_FALSE;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -421,7 +421,7 @@
</span><span class="cx">         counter_increment();
</span><span class="cx">
</span><span class="cx">         if (!pvt) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot allocate application private data\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot allocate application private data\n");
</ins><span class="cx">                 return;
</span><span class="cx">         } else {
</span><span class="cx">                 memset(pvt, 0, sizeof(pvt_t));
</span><span class="lines">@@ -444,7 +444,7 @@
</span><span class="cx">
</span><span class="cx">         buf = switch_core_session_alloc(session, SWITCH_RECOMMENDED_BUFFER_SIZE);
</span><span class="cx">         if (!buf) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot allocate application buffer data\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot allocate application buffer data\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -515,13 +515,13 @@
</span><span class="cx">                 pvt->filename = switch_core_session_strdup(session, data);
</span><span class="cx">                 if (pvt->app_mode == FUNCTION_TX) {
</span><span class="cx">                         if ((switch_file_exists(pvt->filename, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot send inexistant fax file [%s]\n", switch_str_nil(pvt->filename));
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot send inexistant fax file [%s]\n", switch_str_nil(pvt->filename));
</ins><span class="cx">                                 goto done;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><span class="cx">                 if (pvt->app_mode == FUNCTION_TX) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Fax TX filename not set.\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Fax TX filename not set.\n");
</ins><span class="cx">                         goto done;
</span><span class="cx">                 } else if (pvt->app_mode == FUNCTION_RX) {
</span><span class="cx">                         char *fname;
</span><span class="lines">@@ -539,7 +539,7 @@
</span><span class="cx">                                 pvt->filename = switch_core_session_strdup(session, fname);
</span><span class="cx">                                 switch_safe_free(fname);
</span><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot automatically set fax RX destination file\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot automatically set fax RX destination file\n");
</ins><span class="cx">                                 goto done;
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="lines">@@ -556,7 +556,7 @@
</span><span class="cx">         */
</span><span class="cx">
</span><span class="cx">         if ((spanfax_init(pvt, AUDIO_MODE) != SWITCH_STATUS_SUCCESS)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot initialize Fax engine\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot initialize Fax engine\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -588,11 +588,11 @@
</span><span class="cx">                                                          1,
</span><span class="cx">                                                          SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
</span><span class="cx">                                                          NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw read codec activation Success L16 %u\n",
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Raw read codec activation Success L16 %u\n",
</ins><span class="cx">                                                  read_codec.implementation->microseconds_per_packet);
</span><span class="cx">                 switch_core_session_set_read_codec(session, &read_codec);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Raw read codec activation Failed L16\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Raw read codec activation Failed L16\n");
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -604,12 +604,12 @@
</span><span class="cx">                                                          1,
</span><span class="cx">                                                          SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
</span><span class="cx">                                                          NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw write codec activation Success L16\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Raw write codec activation Success L16\n");
</ins><span class="cx">                 write_frame.codec = &write_codec;
</span><span class="cx">                 write_frame.data = buf;
</span><span class="cx">                 write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE;
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Raw write codec activation Failed L16\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Raw write codec activation Failed L16\n");
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -642,18 +642,18 @@
</span><span class="cx">                 if (!switch_test_flag(read_frame, SFF_CNG)) {
</span><span class="cx">                 /* pass the new incoming audio frame to the fax_rx function */
</span><span class="cx">                         if (fax_rx(pvt->fax_state, (int16_t *) read_frame->data, read_frame->samples)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "fax_rx reported an error\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "fax_rx reported an error\n");
</ins><span class="cx">                                 goto done;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ((tx = fax_tx(pvt->fax_state, buf, write_codec.implementation->samples_per_packet)) < 0) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "fax_tx reported an error\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "fax_tx reported an error\n");
</ins><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if (!tx) {
</span><del>-                        /* switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No audio samples to send\n"); */
</del><ins>+                        /* switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "No audio samples to send\n"); */
</ins><span class="cx">                         continue;
</span><span class="cx">                 } else {
</span><span class="cx">                         /* Set our write_frame data */
</span><span class="lines">@@ -663,7 +663,7 @@
</span><span class="cx">
</span><span class="cx">                 if (switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                         /* something weird has happened */
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,
</ins><span class="cx">                                                          "Cannot write frame [datalen: %d, samples: %d]\n", write_frame.datalen, write_frame.samples);
</span><span class="cx">                         goto done;
</span><span class="cx">                 }
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_fifomod_fifoc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -717,7 +717,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(data)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Args\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No Args\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -731,26 +731,26 @@
</span><span class="cx">         arg_inout = argv[1];
</span><span class="cx">
</span><span class="cx">         if (!(arg_fifo_name && arg_inout)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!strcasecmp(arg_inout, "out")) {
</span><span class="cx">                 consumer = 1;
</span><span class="cx">         } else if (strcasecmp(arg_inout, "in")) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         list_string = switch_core_session_strdup(session, arg_fifo_name);
</span><span class="cx">
</span><span class="cx">         if (!(nlist_count = switch_separate_string(list_string, ',', nlist, (sizeof(nlist) / sizeof(nlist[0]))))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!consumer && nlist_count > 1) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1039,7 +1039,7 @@
</span><span class="cx">                         } else if (!strcasecmp(strat_str, "waiting_longer")) {
</span><span class="cx">                                 strat = STRAT_WAITING_LONGER;
</span><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid strategy\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid strategy\n");
</ins><span class="cx">                                 goto done;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -1048,7 +1048,7 @@
</span><span class="cx">                         if (!strcasecmp(argv[2], "nowait")) {
</span><span class="cx">                                 do_wait = 0;
</span><span class="cx">                         } else if (strcasecmp(argv[2], "wait")) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "USAGE %s\n", FIFO_USAGE);
</ins><span class="cx">                                 goto done;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -1435,7 +1435,7 @@
</span><span class="cx">
</span><span class="cx">         switch_mutex_lock(globals.mutex);
</span><span class="cx">         if (node && node->ready == FIFO_DELAY_DESTROY && node->consumer_count == 0 && node->caller_count == 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "%s removed. (delayed)\n", node->name);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "%s removed. (delayed)\n", node->name);
</ins><span class="cx">                 switch_core_hash_delete(globals.fifo_hash, node->name);
</span><span class="cx">                 switch_core_hash_destroy(&node->caller_hash);
</span><span class="cx">                 switch_core_hash_destroy(&node->consumer_hash);
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_fsvmod_fsvc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_fsv/mod_fsv.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_fsv/mod_fsv.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_fsv/mod_fsv.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">         switch_channel_answer(channel);
</span><span class="cx">
</span><span class="cx">         if ((fd = open((char *) data, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, S_IRUSR | S_IWUSR)) < 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error opening file %s\n", (char *) data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Error opening file %s\n", (char *) data);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -126,9 +126,9 @@
</span><span class="cx">                                                          read_impl.microseconds_per_packet / 1000,
</span><span class="cx">                                                          1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
</span><span class="cx">                                                          NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Audio Codec Activation Success\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Audio Codec Activation Success\n");
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Audio Codec Activation Fail\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Audio Codec Activation Fail\n");
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -234,17 +234,17 @@
</span><span class="cx">         vid_buffer = switch_core_session_alloc(session, SWITCH_RECOMMENDED_BUFFER_SIZE);
</span><span class="cx">
</span><span class="cx">         if ((fd = open((char *) data, O_RDONLY | O_BINARY)) < 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error opening file %s\n", (char *) data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Error opening file %s\n", (char *) data);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (read(fd, &h, sizeof(h)) != sizeof(h)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error reading file header\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Error reading file header\n");
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (h.version != VERSION) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "File version does not match!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "File version does not match!\n");
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -267,7 +267,7 @@
</span><span class="cx">
</span><span class="cx">         if (switch_core_timer_init(&timer, "soft", read_impl.microseconds_per_packet / 1000,
</span><span class="cx">                                                          read_impl.samples_per_packet, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Timer Activation Fail\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Timer Activation Fail\n");
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -278,9 +278,9 @@
</span><span class="cx">                                                          h.audio_ptime,
</span><span class="cx">                                                          1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
</span><span class="cx">                                                          NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Audio Codec Activation Success\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Audio Codec Activation Success\n");
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Audio Codec Activation Fail\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Audio Codec Activation Fail\n");
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -291,9 +291,9 @@
</span><span class="cx">                                                          0,
</span><span class="cx">                                                          1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
</span><span class="cx">                                                          NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Video Codec Activation Success\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Video Codec Activation Success\n");
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Video Codec Activation Fail\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Video Codec Activation Fail\n");
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">         switch_core_session_set_read_codec(session, &codec);
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_lcrmod_lcrc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -187,9 +187,9 @@
</span><span class="cx">                 dst = strchr(src, '/');
</span><span class="cx">                 *dst = '\0';
</span><span class="cx">                 dst++;
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "src: %s, dst: %s\n", src, dst);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "src: %s, dst: %s\n", src, dst);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Not a valid regexp: %s\n", src);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Not a valid regexp: %s\n", src);
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -212,13 +212,13 @@
</span><span class="cx">                         dst = dst_regex;
</span><span class="cx">                 }
</span><span class="cx">                         
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "expanded src: %s, dst: %s\n", src, dst);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "expanded src: %s, dst: %s\n", src, dst);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ((proceed = switch_regex_perform(number, src, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
</span><span class="cx">                 len = (uint32_t) (strlen(src) + strlen(dst) + 10) * proceed; /* guestimate size */
</span><span class="cx">                 if (!(substituted = switch_core_alloc(pool, len))) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Memory Error!\n");
</ins><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">                 memset(substituted, 0, len);
</span><span class="lines">@@ -292,7 +292,7 @@
</span><span class="cx">                                                                 , cur_route->gw_prefix, cur_route->prefix
</span><span class="cx">                                                                 , destination_number, cur_route->suffix, cur_route->gw_suffix);
</span><span class="cx">                         
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Returning Dialstring %s\n", data);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Returning Dialstring %s\n", data);
</ins><span class="cx">         return data;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -492,7 +492,7 @@
</span><span class="cx">                         newSQL = switch_event_expand_headers(cb_struct->event, tmpSQL ? tmpSQL : custom_sql);
</span><span class="cx">                         
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT,
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct->session), SWITCH_LOG_CRIT,
</ins><span class="cx">                                                                 "mod_lcr called without a valid session while using a custom_sql that has channel variables.\n");
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -698,7 +698,7 @@
</span><span class="cx">                                                                 cb_struct->lookup_number+1, cb_struct->lookup_number+4,
</span><span class="cx">                                                                 cb_struct->cid+1, cb_struct->cid+4);
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SQL: %s\n", sql);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct->session), SWITCH_LOG_DEBUG, "SQL: %s\n", sql);
</ins><span class="cx">
</span><span class="cx">         return(lcr_execute_sql_callback(sql, intrastatelata_callback, cb_struct));
</span><span class="cx">         
</span><span class="lines">@@ -726,7 +726,7 @@
</span><span class="cx">         
</span><span class="cx">         /* allocate the dedup hash */
</span><span class="cx">         if (switch_core_hash_init(&cb_struct->dedup_hash, cb_struct->pool) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error initializing the dedup hash\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct->session), SWITCH_LOG_ERROR, "Error initializing the dedup hash\n");
</ins><span class="cx">                 return SWITCH_STATUS_GENERR;
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -744,12 +744,12 @@
</span><span class="cx">         } else {
</span><span class="cx">                 rate_field = switch_core_strdup(cb_struct->pool, "rate");
</span><span class="cx">         }
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "intra routing [state:%d lata:%d] so rate field is [%s]\n",
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct->session), SWITCH_LOG_DEBUG, "intra routing [state:%d lata:%d] so rate field is [%s]\n",
</ins><span class="cx">                                          cb_struct->intrastate, cb_struct->intralata, rate_field);
</span><span class="cx">         
</span><span class="cx">         /* set some channel vars if we have a session */
</span><span class="cx">         if (cb_struct->session) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "we have a session\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct->session), SWITCH_LOG_DEBUG, "we have a session\n");
</ins><span class="cx">                 if ((channel = switch_core_session_get_channel(cb_struct->session))) {
</span><span class="cx">                         switch_channel_set_variable_var_check(channel, "lcr_rate_field", rate_field, SWITCH_FALSE);
</span><span class="cx">                         switch_channel_set_variable_var_check(channel, "lcr_query_digits", digits_copy, SWITCH_FALSE);
</span><span class="lines">@@ -759,7 +759,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         if (cb_struct->event) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "we have an event\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct->session), SWITCH_LOG_DEBUG, "we have an event\n");
</ins><span class="cx">                 switch_event_add_header_string(cb_struct->event, SWITCH_STACK_BOTTOM, "lcr_rate_field", rate_field);
</span><span class="cx">                 switch_event_add_header_string(cb_struct->event, SWITCH_STACK_BOTTOM, "lcr_query_digits", digits_copy);
</span><span class="cx">                 id_str = switch_core_sprintf(cb_struct->pool, "%d", cb_struct->profile->id);
</span><span class="lines">@@ -782,7 +782,7 @@
</span><span class="cx">                 switch_safe_free(safe_sql);
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SQL: %s\n", (char *)sql_stream.data);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct->session), SWITCH_LOG_DEBUG, "SQL: %s\n", (char *)sql_stream.data);
</ins><span class="cx">         
</span><span class="cx">         lookup_status = lcr_execute_sql_callback((char *)sql_stream.data, route_add_callback, cb_struct);
</span><span class="cx">
</span><span class="lines">@@ -1094,22 +1094,22 @@
</span><span class="cx">         }
</span><span class="cx">         routes.pool = pool;
</span><span class="cx">         if (!(routes.profile = locate_profile(lcr_profile))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unknown profile: %s\n", lcr_profile);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Unknown profile: %s\n", lcr_profile);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         intrastate = switch_channel_get_variable(channel, "intrastate");
</span><span class="cx">         intralata = switch_channel_get_variable(channel, "intralata");
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "intrastate channel var is [%s]\n", intrastate);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "intralata channel var is [%s]\n", intralata);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "intrastate channel var is [%s]\n", intrastate);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "intralata channel var is [%s]\n", intralata);
</ins><span class="cx">         if (!switch_strlen_zero(intralata) && !strcasecmp((char *)intralata, "true")) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Select routes based on intralata rates\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Select routes based on intralata rates\n");
</ins><span class="cx">                 routes.intralata = SWITCH_FALSE;
</span><span class="cx">         } else if (!switch_strlen_zero(intrastate) && !strcasecmp((char *)intrastate, "true")) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Select routes based on intrastate rates\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Select routes based on intrastate rates\n");
</ins><span class="cx">                 routes.intrastate = SWITCH_TRUE;
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Select routes based on interstate rates\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Select routes based on interstate rates\n");
</ins><span class="cx">                 routes.intrastate = SWITCH_FALSE;
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -1117,12 +1117,12 @@
</span><span class="cx">                 caller_profile = switch_channel_get_caller_profile(channel);
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "LCR Lookup on %s\n", caller_profile->destination_number);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "LCR Lookup on %s\n", caller_profile->destination_number);
</ins><span class="cx">         routes.lookup_number = caller_profile->destination_number;
</span><span class="cx">         routes.cid = (char *) caller_profile->caller_id_number;
</span><span class="cx">         if (lcr_do_lookup(&routes) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 if ((extension = switch_caller_extension_new(session, caller_profile->destination_number, caller_profile->destination_number)) == 0) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "memory error!\n");
</ins><span class="cx">                         goto end;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -1134,7 +1134,7 @@
</span><span class="cx">                         switch_caller_extension_add_application(session, extension, "bridge", cur_route->dialstring);
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "LCR lookup failed for %s\n", caller_profile->destination_number);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "LCR lookup failed for %s\n", caller_profile->destination_number);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> end:
</span><span class="lines">@@ -1191,18 +1191,18 @@
</span><span class="cx">         routes.pool = pool;
</span><span class="cx">
</span><span class="cx">         intra = switch_channel_get_variable(channel, "intrastate");
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "intrastate channel var is [%s]\n", intra);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "intrastate channel var is [%s]\n", intra);
</ins><span class="cx">         if (switch_strlen_zero(intra) || strcasecmp((char *)intra, "true")) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Select routes based on interstate rates\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Select routes based on interstate rates\n");
</ins><span class="cx">                 routes.intrastate = SWITCH_FALSE;
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Select routes based on intrastate rates\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Select routes based on intrastate rates\n");
</ins><span class="cx">                 routes.intrastate = SWITCH_TRUE;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!caller_profile) {
</span><span class="cx">                 if (!(caller_profile = switch_channel_get_caller_profile(channel))) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unable to locate caller_profile\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Unable to locate caller_profile\n");
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1212,7 +1212,7 @@
</span><span class="cx">                         lcr_profile = argv[1];
</span><span class="cx">                 }
</span><span class="cx">                 
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "LCR Lookup on %s using profile %s\n", dest, lcr_profile);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "LCR Lookup on %s using profile %s\n", dest, lcr_profile);
</ins><span class="cx">                 routes.lookup_number = dest;
</span><span class="cx">                 if (caller_profile) {
</span><span class="cx">                         routes.cid = (char *) switch_channel_get_variable(channel, "effective_caller_id_number");
</span><span class="lines">@@ -1222,7 +1222,7 @@
</span><span class="cx">                 }
</span><span class="cx">         
</span><span class="cx">                 if (!(routes.profile = locate_profile(lcr_profile))) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unknown profile: %s\n", lcr_profile);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Unknown profile: %s\n", lcr_profile);
</ins><span class="cx">                         goto end;
</span><span class="cx">                 }
</span><span class="cx">                 if (lcr_do_lookup(&routes) == SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -1248,7 +1248,7 @@
</span><span class="cx">                         switch_channel_set_variable(channel, "lcr_auto_route", rbuf);
</span><span class="cx">                         switch_channel_set_variable(channel, "import", "lcr_carrier,lcr_rate");
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "LCR lookup failed for %s\n", dest);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "LCR lookup failed for %s\n", dest);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -1288,7 +1288,7 @@
</span><span class="cx">                 goto usage;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG
</ins><span class="cx">                                          , "data passed to lcr is [%s]\n", cmd
</span><span class="cx">                                          );
</span><span class="cx">
</span><span class="lines">@@ -1314,7 +1314,7 @@
</span><span class="cx">                         int i;
</span><span class="cx">                         for (i=2; i<argc; i++) {
</span><span class="cx">                                 if (!strcasecmp(argv[i], "intrastate")) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Select routes based on intrastate rates\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Select routes based on intrastate rates\n");
</ins><span class="cx">                                         cb_struct.intrastate = SWITCH_TRUE;
</span><span class="cx">                                 } else if(!strcasecmp(argv[i], "as")) {
</span><span class="cx">                                         i++;
</span><span class="lines">@@ -1324,7 +1324,7 @@
</span><span class="cx">                                                         goto usage;
</span><span class="cx">                                                 }
</span><span class="cx">                                 } else {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set Caller ID to [%s]\n", argv[i]);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Set Caller ID to [%s]\n", argv[i]);
</ins><span class="cx">                                         /* the only other option we have right now is caller id */
</span><span class="cx">                                         cb_struct.cid = switch_core_strdup(pool, argv[i]);
</span><span class="cx">                                 }
</span><span class="lines">@@ -1332,7 +1332,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 if (switch_strlen_zero(cb_struct.cid)) {
</span><span class="cx">                         cb_struct.cid = "18005551212";
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING
</ins><span class="cx">                                                          , "Using default CID [%s]\n", cb_struct.cid
</span><span class="cx">                                                          );
</span><span class="cx">                 }
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_limitmod_limitc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx">                         
</span><span class="cx">                         item = (limit_hash_item_t*)val;
</span><span class="cx">                         item->total_usage--;        
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s is now %d\n", (const char*)key, item->total_usage);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Usage for %s is now %d\n", (const char*)key, item->total_usage);
</ins><span class="cx">                         
</span><span class="cx">                         if (item->total_usage == 0) {
</span><span class="cx">                                 /* Noone is using this item anymore */
</span><span class="lines">@@ -470,13 +470,13 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (argc < 3 || !argv[0]) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: db %s\n", DB_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "USAGE: db %s\n", DB_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!strcasecmp(argv[0], "insert")) {
</span><span class="cx">                 if (argc < 4) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: db %s\n", DB_USAGE);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "USAGE: db %s\n", DB_USAGE);
</ins><span class="cx">                         return;
</span><span class="cx">                 }
</span><span class="cx">                 sql = switch_mprintf("delete from db_data where realm='%q' and data_key='%q'", argv[1], argv[2]);
</span><span class="lines">@@ -490,7 +490,7 @@
</span><span class="cx">         } else if (!strcasecmp(argv[0], "delete")) {
</span><span class="cx">                 sql = switch_mprintf("delete from db_data where realm='%q' and data_key='%q'", argv[1], argv[2]);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: db %s\n", DB_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "USAGE: db %s\n", DB_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -548,7 +548,7 @@
</span><span class="cx">         goto done;
</span><span class="cx">
</span><span class="cx"> usage:
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: hash %s\n", HASH_USAGE);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "USAGE: hash %s\n", HASH_USAGE);
</ins><span class="cx">
</span><span class="cx"> done:
</span><span class="cx">         switch_mutex_unlock(globals.db_hash_mutex);
</span><span class="lines">@@ -718,7 +718,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (argc < 3 || !argv[0]) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: group %s\n", DB_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "USAGE: group %s\n", DB_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -759,7 +759,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (argc < 3) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: limit %s\n", LIMIT_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "USAGE: limit %s\n", LIMIT_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -914,13 +914,13 @@
</span><span class="cx">                         item->rate_usage++;
</span><span class="cx">
</span><span class="cx">                         if ((max >= 0) && (item->rate_usage > (uint32_t)max)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s exceeds maximum rate of %d/%ds, now at %d\n", hashkey, max, interval, item->rate_usage);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Usage for %s exceeds maximum rate of %d/%ds, now at %d\n", hashkey, max, interval, item->rate_usage);
</ins><span class="cx">                                 status = SWITCH_FALSE;
</span><span class="cx">                                 goto end;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         } else if ((max >= 0) && (item->total_usage + increment > (uint32_t)max)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s is already at max value (%d)\n", hashkey, item->total_usage);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Usage for %s is already at max value (%d)\n", hashkey, item->total_usage);
</ins><span class="cx">                 status = SWITCH_FALSE;
</span><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="lines">@@ -931,11 +931,11 @@
</span><span class="cx">                 switch_core_hash_insert(pvt->hash, hashkey, item);
</span><span class="cx">
</span><span class="cx">                 if (max == -1) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s is now %d\n", hashkey, item->total_usage);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Usage for %s is now %d\n", hashkey, item->total_usage);
</ins><span class="cx">                 } else if (interval == 0) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s is now %d/%d\n", hashkey, item->total_usage, max);        
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Usage for %s is now %d/%d\n", hashkey, item->total_usage, max);        
</ins><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s is now %d/%d for the last %d seconds\n", hashkey, item->rate_usage, max, interval);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Usage for %s is now %d/%d for the last %d seconds\n", hashkey, item->rate_usage, max, interval);
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 limit_fire_event(realm, id, item->total_usage, item->rate_usage, max, max >=0 ? (uint32_t)max : 0);
</span><span class="lines">@@ -978,7 +978,7 @@
</span><span class="cx">         
</span><span class="cx">         if ((item = (limit_hash_item_t*)switch_core_hash_find(pvt->hash, hashkey))) {
</span><span class="cx">                 item->total_usage--;        
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s is now %d\n", (const char*)hashkey, item->total_usage);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Usage for %s is now %d\n", (const char*)hashkey, item->total_usage);
</ins><span class="cx">         
</span><span class="cx">                 switch_core_hash_delete(pvt->hash, hashkey);
</span><span class="cx">         
</span><span class="lines">@@ -1014,7 +1014,7 @@
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         if (argc < 2) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: limit_hash %s\n", LIMITHASH_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "USAGE: limit_hash %s\n", LIMITHASH_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -1075,7 +1075,7 @@
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         if (argc < 2) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: limit_hash_execute %s\n", LIMITHASHEXECUTE_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "USAGE: limit_hash_execute %s\n", LIMITHASHEXECUTE_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -1102,7 +1102,7 @@
</span><span class="cx">         app_arg = argv[4];
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(app)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing application\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Missing application\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_memcachemod_memcachec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_memcache/mod_memcache.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_memcache/mod_memcache.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_memcache/mod_memcache.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx">                 /* clone memcached struct so we're thread safe */
</span><span class="cx">                 memcached = memcached_clone(NULL, globals.memcached);
</span><span class="cx">                 if (!memcached) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error cloning memcached object");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error cloning memcached object");
</ins><span class="cx">                         stream->write_function(stream, "-ERR Error cloning memcached object\n");
</span><span class="cx">                 }
</span><span class="cx">                 
</span><span class="lines">@@ -254,14 +254,14 @@
</span><span class="cx">                                 rc = memcached_add(memcached, key, strlen(key), (increment) ? svalue : "0", strlen(svalue), 0, 0);
</span><span class="cx">                                 if (rc == MEMCACHED_SUCCESS) {
</span><span class="cx">                                         ivalue = (increment) ? offset : 0;
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Initialized inc/dec memcache key: %s to value %d\n", key, offset);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Initialized inc/dec memcache key: %s to value %d\n", key, offset);
</ins><span class="cx">                                 } else {
</span><span class="cx">                                         if (increment) {
</span><span class="cx">                                                 rc = memcached_increment(memcached, key, strlen(key), offset, &ivalue);
</span><span class="cx">                                         } else {
</span><span class="cx">                                                 rc = memcached_decrement(memcached, key, strlen(key), offset, &ivalue);
</span><span class="cx">                                         }
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Someone else created incr/dec memcache key, resubmitting inc/dec request.\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Someone else created incr/dec memcache key, resubmitting inc/dec request.\n");
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         if (rc == MEMCACHED_SUCCESS) {
</span><span class="lines">@@ -336,7 +336,7 @@
</span><span class="cx">
</span><span class="cx"> mcache_error:
</span><span class="cx">         if (rc != MEMCACHED_NOTFOUND) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error while running command %s: %s\n", subcmd, memcached_strerror(memcached, rc));
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error while running command %s: %s\n", subcmd, memcached_strerror(memcached, rc));
</ins><span class="cx">         }
</span><span class="cx">         stream->write_function(stream, "-ERR %s\n", memcached_strerror(memcached, rc));
</span><span class="cx">         goto done;
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_nibblebillmod_nibblebillc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_nibblebill/mod_nibblebill.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_nibblebill/mod_nibblebill.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_nibblebill/mod_nibblebill.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -394,7 +394,7 @@
</span><span class="cx">                 return SWITCH_STATUS_SUCCESS;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Attempting to bill at $%s per minute to account %s\n", billrate, billaccount);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Attempting to bill at $%s per minute to account %s\n", billrate, billaccount);
</ins><span class="cx">
</span><span class="cx">         /* Get caller profile info from channel */
</span><span class="cx">         profile = switch_channel_get_caller_profile(channel);
</span><span class="lines">@@ -405,14 +405,14 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (profile->times->answered < 1) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Not billing %s - call is not in answered state\n", billaccount);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Not billing %s - call is not in answered state\n", billaccount);
</ins><span class="cx">
</span><span class="cx">                 /* See if this person has enough money left to continue the call */
</span><span class="cx">                 balance = get_balance(billaccount);
</span><del>-switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Comparing %f to hangup balance of %f\n", balance, globals.nobal_amt);
</del><ins>+switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Comparing %f to hangup balance of %f\n", balance, globals.nobal_amt);
</ins><span class="cx">                 if (balance <= globals.nobal_amt) {
</span><span class="cx">                         /* Not enough money - reroute call to nobal location */
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Balance of %f fell below allowed amount of %f! (Account %s)\n", balance, globals.nobal_amt, billaccount);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Balance of %f fell below allowed amount of %f! (Account %s)\n", balance, globals.nobal_amt, billaccount);
</ins><span class="cx">
</span><span class="cx">                         transfer_call(session, globals.nobal_action);
</span><span class="cx">                 }
</span><span class="lines">@@ -433,7 +433,7 @@
</span><span class="cx">                 if (globals.mutex) {
</span><span class="cx">                         switch_mutex_unlock(globals.mutex);
</span><span class="cx">                 }
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Received heartbeat, but we're paused - ignoring\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Received heartbeat, but we're paused - ignoring\n");
</ins><span class="cx">                 return SWITCH_STATUS_SUCCESS;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -444,21 +444,21 @@
</span><span class="cx">
</span><span class="cx">                 /* Setup new billing data (based on call answer time, in case this module started late with active calls) */
</span><span class="cx">                 nibble_data->lastts = profile->times->answered;                /* Set the initial answer time to match when the call was really answered */
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Beginning new billing on %s\n", uuid);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Beginning new billing on %s\n", uuid);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Last successful billing time was %s\n", date);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Last successful billing time was %s\n", date);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         switch_time_exp_lt(&tm, nibble_data->lastts);
</span><span class="cx">         switch_strftime_nocheck(date, &retsize, sizeof(date), "%Y-%m-%d %T", &tm);
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%d seconds passed since last bill time of %s\n", (int) ((ts - nibble_data->lastts) / 1000000), date);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%d seconds passed since last bill time of %s\n", (int) ((ts - nibble_data->lastts) / 1000000), date);
</ins><span class="cx">
</span><span class="cx">         if ((ts - nibble_data->lastts) >= 0) {
</span><span class="cx">                 /* Convert billrate into microseconds and multiply by # of microseconds that have passed since last *successful* bill */
</span><span class="cx">                 billamount = ((float)atof(billrate) / 1000000 / 60) * ((ts - nibble_data->lastts)) - nibble_data->bill_adjustments;
</span><span class="cx">
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Billing $%f to %s (Call: %s / %f so far)\n", billamount, billaccount, uuid, nibble_data->total);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Billing $%f to %s (Call: %s / %f so far)\n", billamount, billaccount, uuid, nibble_data->total);
</ins><span class="cx">
</span><span class="cx">                 /* DO ODBC BILLING HERE and reset counters if it's successful! */
</span><span class="cx">                 if (bill_event(billamount, billaccount) == SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -471,10 +471,10 @@
</span><span class="cx">                         /* Update channel variable with current billing */
</span><span class="cx">                         switch_channel_set_variable_printf(channel, "nibble_total_billed", "%f", nibble_data->total);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to log to database!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Failed to log to database!\n");
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Just tried to bill %s negative minutes! That should be impossible.\n", uuid);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Just tried to bill %s negative minutes! That should be impossible.\n", uuid);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /* Update the last time we billed */
</span><span class="lines">@@ -488,7 +488,7 @@
</span><span class="cx">                 balance = get_balance(billaccount);
</span><span class="cx">                 if (balance <= globals.nobal_amt) {
</span><span class="cx">                         /* Not enough money - reroute call to nobal location */
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Balance of %f fell below allowed amount of %f! (Account %s)\n", balance, globals.nobal_amt, billaccount);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Balance of %f fell below allowed amount of %f! (Account %s)\n", balance, globals.nobal_amt, billaccount);
</ins><span class="cx">
</span><span class="cx">                         /* IMPORTANT: Billing must be paused before the transfer occurs! This prevents infinite loops, since the transfer will result */
</span><span class="cx">                         /* in nibblebill checking the call again in the routing process for an allowed balance! */
</span><span class="lines">@@ -563,7 +563,7 @@
</span><span class="cx">         nibble_data = (nibble_data_t *) switch_channel_get_private(channel, "_nibble_data_");
</span><span class="cx">
</span><span class="cx">         if (!nibble_data) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Can't pause - channel is not initialized for billing!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Can't pause - channel is not initialized for billing!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -571,7 +571,7 @@
</span><span class="cx">         if (nibble_data->pausets == 0)
</span><span class="cx">                 nibble_data->pausets = ts;
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Paused billing timestamp!\n");
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Paused billing timestamp!\n");
</ins><span class="cx">
</span><span class="cx">         /* Done checking - release lock */
</span><span class="cx">         if (globals.mutex) {
</span><span class="lines">@@ -594,12 +594,12 @@
</span><span class="cx">         nibble_data = (nibble_data_t *) switch_channel_get_private(channel, "_nibble_data_");
</span><span class="cx">
</span><span class="cx">         if (!nibble_data) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't resume - channel is not initialized for billing (This is expected at hangup time)!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Can't resume - channel is not initialized for billing (This is expected at hangup time)!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (nibble_data->pausets == 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't resume - channel is not paused! (This is expected at hangup time)\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Can't resume - channel is not paused! (This is expected at hangup time)\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -612,7 +612,7 @@
</span><span class="cx">
</span><span class="cx">         /* Calculate how much was "lost" to billings during pause - we do this here because you never know when the billrate may change during a call */
</span><span class="cx">         nibble_data->bill_adjustments += ((float)atof(billrate) / 1000000 / 60) * ((ts - nibble_data->pausets));
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Resumed billing! Subtracted %f from this billing cycle.\n", (atof(billrate) / 1000000 / 60) * ((ts - nibble_data->pausets)));
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Resumed billing! Subtracted %f from this billing cycle.\n", (atof(billrate) / 1000000 / 60) * ((ts - nibble_data->pausets)));
</ins><span class="cx">
</span><span class="cx">         nibble_data->pausets = 0;
</span><span class="cx">
</span><span class="lines">@@ -636,7 +636,7 @@
</span><span class="cx">         nibble_data = (nibble_data_t *) switch_channel_get_private(channel, "_nibble_data_");
</span><span class="cx">
</span><span class="cx">         if (!nibble_data) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Can't reset - channel is not initialized for billing!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Can't reset - channel is not initialized for billing!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -648,7 +648,7 @@
</span><span class="cx">         /* Update the last time we billed */
</span><span class="cx">         nibble_data->lastts = ts;
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Reset last billing timestamp marker to right now!\n");
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Reset last billing timestamp marker to right now!\n");
</ins><span class="cx">
</span><span class="cx">         /* Done checking - release lock */
</span><span class="cx">         if (globals.mutex) {
</span><span class="lines">@@ -670,7 +670,7 @@
</span><span class="cx">         nibble_data = (nibble_data_t *) switch_channel_get_private(channel, "_nibble_data_");
</span><span class="cx">
</span><span class="cx">         if (!nibble_data) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Can't check - channel is not initialized for billing!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Can't check - channel is not initialized for billing!\n");
</ins><span class="cx">                 return -99999;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -709,9 +709,9 @@
</span><span class="cx">
</span><span class="cx">         /* Add or remove amount from adjusted billing here. Note, we bill the OPPOSITE */
</span><span class="cx">         if (bill_event(-amount, billaccount) == SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Recorded adjustment to %s for $%f\n", billaccount, amount);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Recorded adjustment to %s for $%f\n", billaccount, amount);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to record adjustment to %s for $%f\n", billaccount, amount);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to record adjustment to %s for $%f\n", billaccount, amount);
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -733,7 +733,7 @@
</span><span class="cx">                 } else if (!strcasecmp(argv[0], "resume")) {
</span><span class="cx">                         nibblebill_resume(session);
</span><span class="cx">                 } else if (!strcasecmp(argv[0], "check")) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Current billing is at $%f\n", nibblebill_check(session));
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Current billing is at $%f\n", nibblebill_check(session));
</ins><span class="cx">                 } else if (!strcasecmp(argv[0], "reset")) {
</span><span class="cx">                         nibblebill_reset(session);
</span><span class="cx">                 } else if (!strcasecmp(argv[0], "heartbeat") && argc == 2) {
</span><span class="lines">@@ -768,7 +768,7 @@
</span><span class="cx">                                 } else if (!strcasecmp(argv[1], "resume")) {
</span><span class="cx">                                         nibblebill_resume(psession);
</span><span class="cx">                                 } else if (!strcasecmp(argv[1], "check")) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Current billing is at $%f\n", nibblebill_check(psession));
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Current billing is at $%f\n", nibblebill_check(psession));
</ins><span class="cx">                                 } else if (!strcasecmp(argv[1], "reset")) {
</span><span class="cx">                                         nibblebill_reset(psession);
</span><span class="cx">                                 } else if (!strcasecmp(argv[1], "heartbeat") && argc == 3) {
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_rssmod_rssc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!(cxml = switch_xml_open_cfg(cf, &cfg, NULL))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">         switch_safe_free(chanvars);
</span><span class="lines">@@ -251,20 +251,20 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!feed_index) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No Feeds Specified!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "No Feeds Specified!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (switch_channel_media_ready(channel)) {
</span><span class="cx">                 rate = read_impl.actual_samples_per_second;
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Codec Error!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Codec Error!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         memset(&sh, 0, sizeof(sh));
</span><span class="cx">         if (switch_core_speech_open(&sh, engine, voice, rate, interval, &flags, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid TTS module!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -275,9 +275,9 @@
</span><span class="cx">                                                          interval,
</span><span class="cx">                                                          1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
</span><span class="cx">                                                          switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Raw Codec Activated\n");
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n", rate, interval);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n", rate, interval);
</ins><span class="cx">                 flags = 0;
</span><span class="cx">                 switch_core_speech_close(&sh, &flags);
</span><span class="cx">                 return;
</span><span class="lines">@@ -285,13 +285,13 @@
</span><span class="cx">
</span><span class="cx">         if (timer_name) {
</span><span class="cx">                 if (switch_core_timer_init(&timer, timer_name, interval, (int) (rate / 50), switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Setup timer failed!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Setup timer failed!\n");
</ins><span class="cx">                         switch_core_codec_destroy(&speech_codec);
</span><span class="cx">                         flags = 0;
</span><span class="cx">                         switch_core_speech_close(&sh, &flags);
</span><span class="cx">                         return;
</span><span class="cx">                 }
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Setup timer success %u bytes per %d ms!\n", (rate / 50) * 2, interval);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Setup timer success %u bytes per %d ms!\n", (rate / 50) * 2, interval);
</ins><span class="cx">
</span><span class="cx">                 /* start a thread to absorb incoming audio */
</span><span class="cx">                 switch_core_service_session(session);
</span><span class="lines">@@ -388,14 +388,14 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if (!(xml = switch_xml_parse_file(filename))) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", filename);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Open of %s failed\n", filename);
</ins><span class="cx">                         goto finished;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 err = switch_xml_error(xml);
</span><span class="cx">
</span><span class="cx">                 if (!switch_strlen_zero(err)) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Error [%s]\n", err);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Error [%s]\n", err);
</ins><span class="cx">                         goto finished;
</span><span class="cx">                 }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_soundtouchmod_soundtouchcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx">                                 break;
</span><span class="cx">
</span><span class="cx">                         case '0':
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "pitch: %f tempo: %f rate: %f\n",sth->pitch,sth->tempo,sth->rate);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "pitch: %f tempo: %f rate: %f\n",sth->pitch,sth->tempo,sth->rate);
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                 }
</span><span class="lines">@@ -259,7 +259,7 @@
</span><span class="cx">                         switch_channel_set_private(channel, "_soundtouch_", NULL);
</span><span class="cx">                         switch_core_media_bug_remove(session, &bug);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</ins><span class="cx">                 }
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="lines">@@ -300,7 +300,7 @@
</span><span class="cx">
</span><span class="cx">         if ((status = switch_core_media_bug_add(session, soundtouch_callback, sth, 0,
</span><span class="cx">                                                                                         sth->send_not_recv ? SMBF_WRITE_REPLACE : SMBF_READ_REPLACE, &bug)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failure!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failure!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_spymod_spyc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_spy/mod_spy.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_spy/mod_spy.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_spy/mod_spy.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -54,10 +54,10 @@
</span><span class="cx">         switch_thread_rwlock_wrlock(globals.spy_hash_lock);
</span><span class="cx">         
</span><span class="cx">         if ((switch_core_hash_delete(globals.spy_hash,data) != SWITCH_STATUS_SUCCESS)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,"No such key in userspy: %s \n",data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,"No such key in userspy: %s \n",data);
</ins><span class="cx">
</span><span class="cx">         } else {        
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"Userspy deactivated on %s\n",data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,"Userspy deactivated on %s\n",data);
</ins><span class="cx">                 globals.spy_count--;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">
</span><span class="cx">         if (spy_uuid) {
</span><span class="cx">                 if (switch_ivr_eavesdrop_session(session,spy_uuid,NULL,ED_DTMF) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,"Can't eavesdrop on uuid %s\n",spy_uuid);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,"Can't eavesdrop on uuid %s\n",spy_uuid);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"UserSpy retrieved uuid %s for key %s, activating eavesdrop \n",uuid,key);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,"UserSpy retrieved uuid %s for key %s, activating eavesdrop \n",uuid,key);
</ins><span class="cx">         my_uuid = switch_event_get_header(event,"Unique-ID");
</span><span class="cx">
</span><span class="cx">         session = switch_core_session_locate(uuid);
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx">
</span><span class="cx">                         switch_thread_rwlock_wrlock(globals.spy_hash_lock);
</span><span class="cx">                         if (switch_core_hash_find(globals.spy_hash,argv[0])) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,"Spy already exists for %s\n",argv[0]);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,"Spy already exists for %s\n",argv[0]);
</ins><span class="cx">                                 switch_channel_hangup(channel,SWITCH_CAUSE_NORMAL_CLEARING);
</span><span class="cx">                                 switch_thread_rwlock_unlock(globals.spy_hash_lock);
</span><span class="cx">                                 return;
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">                         status = switch_core_hash_insert(globals.spy_hash,argv[0],(void*) uuid);
</span><span class="cx">
</span><span class="cx">                         if ((status != SWITCH_STATUS_SUCCESS)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,"Cant insert to spy hash\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,"Cant insert to spy hash\n");
</ins><span class="cx">                                 switch_channel_hangup(channel,SWITCH_CAUSE_SERVICE_NOT_IMPLEMENTED);
</span><span class="cx">                                 switch_thread_rwlock_unlock(globals.spy_hash_lock);                
</span><span class="cx">                                 return;
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx">                         switch_channel_set_private(channel,"_userspy_",(void*) argv[0]);
</span><span class="cx">                         switch_channel_add_state_handler(channel,&spy_state_handlers);
</span><span class="cx">
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,"UserSpy activated on %s \n",argv[0]);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE,"UserSpy activated on %s \n",argv[0]);
</ins><span class="cx">
</span><span class="cx">                         if (argv[1]) {
</span><span class="cx">                                 switch_channel_set_variable(channel,"spy_uuid",argv[1]);
</span><span class="lines">@@ -231,7 +231,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", USERSPY_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", USERSPY_SYNTAX);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_spy_load)
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_stressmod_stresscpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_stress/mod_stress.cpp (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_stress/mod_stress.cpp        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_stress/mod_stress.cpp        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx">
</span><span class="cx"> if (sth->stress) {
</span><span class="cx"> switch_event_t *event, *dup;
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stress %0.2f\n", sth->stress);
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(switch_core_media_bug_get_session(bug)), SWITCH_LOG_DEBUG, "Stress %0.2f\n", sth->stress);
</ins><span class="cx">
</span><span class="cx"> if (switch_event_create(&event, SWITCH_EVENT_DETECTED_SPEECH) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx"> switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Speech-Type", "stress-level");
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx"> switch_event_fire(&dup);
</span><span class="cx"> }
</span><span class="cx"> if (switch_core_session_queue_event(sth->session, &event) != SWITCH_STATUS_SUCCESS) {
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Event queue failed!\n");
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(switch_core_media_bug_get_session(bug)), SWITCH_LOG_ERROR, "Event queue failed!\n");
</ins><span class="cx"> switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "delivery-failure", "true");
</span><span class="cx"> switch_event_fire(&event);
</span><span class="cx"> }
</span><span class="lines">@@ -210,7 +210,7 @@
</span><span class="cx">                         switch_channel_set_private(channel, "_stress_", NULL);
</span><span class="cx">                         switch_core_media_bug_remove(session, &bug);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</ins><span class="cx">                 }
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="lines">@@ -230,7 +230,7 @@
</span><span class="cx">
</span><span class="cx">         if ((status = switch_core_media_bug_add(session, stress_callback, sth, 0,
</span><span class="cx">                                                                                         sth->read ? SMBF_READ_REPLACE : SMBF_WRITE_REPLACE, &bug)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failure!\n");
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failure!\n");
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_t38gatewaymod_t38gatewayc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_t38gateway/mod_t38gateway.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_t38gateway/mod_t38gateway.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_t38gateway/mod_t38gateway.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* We have already started */
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</ins><span class="cx">
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx"> status = switch_core_media_bug_add(session, t38gateway_callback, t38gateway_info, 0, SMBF_READ_STREAM, &bug);
</span><span class="cx">
</span><span class="cx"> if (status != SWITCH_STATUS_SUCCESS) {
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failure hooking to stream\n");
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failure hooking to stream\n");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_vmdmod_vmdc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_vmd/mod_vmd.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_vmd/mod_vmd.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_vmd/mod_vmd.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -334,7 +334,7 @@
</span><span class="cx"> switch_core_session_queue_event(vmd_info->session, &event);
</span><span class="cx"> switch_event_fire(&event_copy);
</span><span class="cx">
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "<<< VMD - Beep Detected >>>\n");
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(vmd_info->session), SWITCH_LOG_INFO, "<<< VMD - Beep Detected >>>\n");
</ins><span class="cx"> switch_channel_set_variable(channel, "vmd_detect", "TRUE");
</span><span class="cx">
</span><span class="cx"> vmd_info->timestamp = 0;
</span><span class="lines">@@ -559,7 +559,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* We have already started */
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</ins><span class="cx">
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -582,7 +582,7 @@
</span><span class="cx"> status = switch_core_media_bug_add(session, vmd_callback, vmd_info, 0, SMBF_READ_REPLACE, &bug);
</span><span class="cx">
</span><span class="cx"> if (status != SWITCH_STATUS_SUCCESS) {
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failure hooking to stream\n");
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failure hooking to stream\n");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -673,7 +673,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* We have already started */
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Cannot run 2 at once on the same channel!\n");
</ins><span class="cx">
</span><span class="cx"> switch_safe_free(ccmd);
</span><span class="cx"> return SWITCH_STATUS_FALSE;
</span><span class="lines">@@ -711,7 +711,7 @@
</span><span class="cx">
</span><span class="cx"> /* If adding a media bug fails exit */
</span><span class="cx"> if (status != SWITCH_STATUS_SUCCESS) {
</span><del>- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failure hooking to stream\n");
</del><ins>+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failure hooking to stream\n");
</ins><span class="cx">
</span><span class="cx"> switch_safe_free(ccmd);
</span><span class="cx"> return SWITCH_STATUS_FALSE;
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_voicemailmod_voicemailc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -1150,14 +1150,14 @@
</span><span class="cx">
</span><span class="cx">                 if (limit && (*message_len = fh.sample_count / read_impl.actual_samples_per_second) < profile->min_record_len) {
</span><span class="cx">                         if (unlink(file_path) != 0) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", file_path);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", file_path);
</ins><span class="cx">                         }
</span><span class="cx">                         got_file = 0;
</span><span class="cx">                         if (exit_keys && input[0] && strchr(exit_keys, input[0])) {
</span><span class="cx">                                 *key_pressed = input[0];
</span><span class="cx">                                 return SWITCH_STATUS_SUCCESS;
</span><span class="cx">                         }
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Message is less than minimum record length: %d, discarding it.\n",
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Message is less than minimum record length: %d, discarding it.\n",
</ins><span class="cx">                                                          profile->min_record_len);
</span><span class="cx">                         if (switch_channel_ready(channel) && counter < profile->max_retries) {
</span><span class="cx">                                 TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, "too-small", NULL, NULL));
</span><span class="lines">@@ -1349,7 +1349,7 @@
</span><span class="cx">                                                          lfh.channels,
</span><span class="cx">                                                          read_impl.actual_samples_per_second,
</span><span class="cx">                                                          SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open file %s\n", tmp_path);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to open file %s\n", tmp_path);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1361,7 +1361,7 @@
</span><span class="cx">                                                          lfh.channels,
</span><span class="cx">                                                          read_impl.actual_samples_per_second,
</span><span class="cx">                                                          SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open file %s\n", announce);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to open file %s\n", announce);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1398,7 +1398,7 @@
</span><span class="cx">                                                          lfh.channels,
</span><span class="cx">                                                          read_impl.actual_samples_per_second,
</span><span class="cx">                                                          SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open file %s\n", orig);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to open file %s\n", orig);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1420,7 +1420,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (unlink(announce) != 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", announce);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", announce);
</ins><span class="cx">         }
</span><span class="cx">         ret = tmp_path;
</span><span class="cx">         
</span><span class="lines">@@ -1530,7 +1530,7 @@
</span><span class="cx">                                                 switch_ivr_sleep(session, 1500, SWITCH_TRUE, NULL);
</span><span class="cx">                                                 forward_file_path = new_path;
</span><span class="cx">                                         } else {
</span><del>-                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error merging files\n");
</del><ins>+                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error merging files\n");
</ins><span class="cx">                                                 TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, "deleted", NULL, NULL));
</span><span class="cx">                                                 goto end;
</span><span class="cx">                                         }
</span><span class="lines">@@ -1550,10 +1550,10 @@
</span><span class="cx">                                 cmd = switch_core_session_sprintf(session, "%s@%s %s %s %s", vm_cc, cbt->domain, new_file_path, cbt->cid_number, cbt->cid_name);
</span><span class="cx">
</span><span class="cx">                                 if (voicemail_inject(cmd) == SWITCH_STATUS_SUCCESS) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Sent Carbon Copy to %s\n", vm_cc);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Sent Carbon Copy to %s\n", vm_cc);
</ins><span class="cx">                                         TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, "saved", NULL, NULL));
</span><span class="cx">                                 } else {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to Carbon Copy to %s\n", vm_cc);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to Carbon Copy to %s\n", vm_cc);
</ins><span class="cx">                                         TRY_CODE(switch_ivr_phrase_macro(session, VM_INVALID_EXTENSION_MACRO, vm_cc, NULL, NULL));
</span><span class="cx">                                         goto get_exten;
</span><span class="cx">                                 }
</span><span class="lines">@@ -1660,7 +1660,7 @@
</span><span class="cx">                                         }
</span><span class="cx">
</span><span class="cx">                                         switch_simple_email(cbt->email, from, header_string, body, cbt->file_path);
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sending message to %s\n", cbt->email);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Sending message to %s\n", cbt->email);
</ins><span class="cx">                                         switch_safe_free(body);
</span><span class="cx">                                         TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, "emailed", NULL, NULL));
</span><span class="cx">                                 } else {
</span><span class="lines">@@ -1679,7 +1679,7 @@
</span><span class="cx">
</span><span class="cx">         if (forward_file_path) {
</span><span class="cx">                 if (unlink(forward_file_path) != 0) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", forward_file_path);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", forward_file_path);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -2102,7 +2102,7 @@
</span><span class="cx">                                         
</span><span class="cx">                                         if (switch_xml_locate_user("id", myid, domain_name, switch_channel_get_variable(channel, "network_addr"),
</span><span class="cx">                                                                                          &x_domain_root, &x_domain, &x_user, NULL, params) != SWITCH_STATUS_SUCCESS) {
</span><del>-                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", myid, domain_name);
</del><ins>+                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", myid, domain_name);
</ins><span class="cx">                                                 ok = 0;
</span><span class="cx">                                         } else {
</span><span class="cx">                                                 myid = switch_core_session_strdup(session, switch_xml_attr(x_user, "id"));
</span><span class="lines">@@ -2226,7 +2226,7 @@
</span><span class="cx">                                                 }
</span><span class="cx">
</span><span class="cx">                                                 if (switch_dir_make_recursive(dir_path, SWITCH_DEFAULT_DIR_PERMS, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error creating %s\n", dir_path);
</del><ins>+                                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error creating %s\n", dir_path);
</ins><span class="cx">                                                         goto end;
</span><span class="cx">                                                 }
</span><span class="cx">                                         }
</span><span class="lines">@@ -2870,7 +2870,7 @@
</span><span class="cx">                         if (send_main && switch_strlen_zero(vm_email) && !switch_strlen_zero(email_addr)) {
</span><span class="cx">                                 vm_email = switch_core_session_strdup(session, email_addr);
</span><span class="cx">                                 if (switch_strlen_zero(vm_email)) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No email address, not going to send email.\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "No email address, not going to send email.\n");
</ins><span class="cx">                                         send_main = 0;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="lines">@@ -2878,13 +2878,13 @@
</span><span class="cx">                         if (send_notify && switch_strlen_zero(vm_notify_email)) {
</span><span class="cx">                                 vm_notify_email = vm_email;
</span><span class="cx">                                 if (switch_strlen_zero(vm_notify_email)) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No notify email address, not going to notify.\n");
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "No notify email address, not going to notify.\n");
</ins><span class="cx">                                         send_notify = 0;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         
</span><span class="cx">                         if (send_mail && (!(send_main || send_notify))) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Falling back to leaving message locally due to too many misconfiguration.\n");
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Falling back to leaving message locally due to too many misconfiguration.\n");
</ins><span class="cx">                                 send_mail = 0;
</span><span class="cx">                                 insert_db = 1;
</span><span class="cx">                         }
</span><span class="lines">@@ -2894,7 +2894,7 @@
</span><span class="cx">                         }
</span><span class="cx">                         
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", id, domain_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", id, domain_name);
</ins><span class="cx">                         ok = 0;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -2916,7 +2916,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (switch_dir_make_recursive(dir_path, SWITCH_DEFAULT_DIR_PERMS, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error creating %s\n", dir_path);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error creating %s\n", dir_path);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -3019,7 +3019,7 @@
</span><span class="cx">                 vm_execute_sql_callback(profile, profile->mutex, sql, sql2str_callback, &callback);
</span><span class="cx">
</span><span class="cx">                 if (atoi(disk_usage) >= disk_quota) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Voicemail disk quota is exceeded for %s\n", id);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Voicemail disk quota is exceeded for %s\n", id);
</ins><span class="cx">                         TRY_CODE(switch_ivr_phrase_macro(session, VM_DISK_QUOTA_EXCEEDED_MACRO, NULL, NULL, NULL));
</span><span class="cx">                         goto end;
</span><span class="cx">                 }
</span><span class="lines">@@ -3087,13 +3087,13 @@
</span><span class="cx">                         if ((vm_cc = switch_channel_get_variable(channel, "vm_cc"))) {
</span><span class="cx">                                 char *cmd = switch_core_session_sprintf(session, "%s %s %s %s", vm_cc, file_path, caller_id_number, caller_id_name);
</span><span class="cx">                                 if (voicemail_inject(cmd) == SWITCH_STATUS_SUCCESS) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Sent Carbon Copy to %s\n", vm_cc);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Sent Carbon Copy to %s\n", vm_cc);
</ins><span class="cx">                                 } else {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to Carbon Copy to %s\n", vm_cc);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to Carbon Copy to %s\n", vm_cc);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to deliver message\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to deliver message\n");
</ins><span class="cx">                         TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, "deleted", NULL, NULL));
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -3178,12 +3178,12 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (switch_strlen_zero(profile_name) || switch_strlen_zero(domain_name)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Usage: %s\n", VM_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error Usage: %s\n", VM_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!(profile = get_profile(profile_name))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error invalid profile %s\n", profile_name);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error invalid profile %s\n", profile_name);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_core_ioc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_core_io.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_core_io.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/switch_core_io.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -1078,7 +1078,7 @@
</span><span class="cx">         switch_io_event_hook_kill_channel_t *ptr;
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_FALSE;
</span><span class="cx">
</span><del>-        switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG, "Send signal %s [%s]\n", switch_channel_get_name(session->channel),
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_core_session_get_uuid(session), SWITCH_LOG_DEBUG, "Send signal %s [%s]\n", switch_channel_get_name(session->channel),
</ins><span class="cx">                                          SIG_NAMES[sig]);
</span><span class="cx">
</span><span class="cx">         if (session->endpoint_interface->io_routines->kill_channel) {
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_core_memoryc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_core_memory.c (14509 => 14510)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_core_memory.c        2009-08-13 20:35:02 UTC (rev 14509)
+++ freeswitch/trunk/src/switch_core_memory.c        2009-08-13 21:24:51 UTC (rev 14510)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">
</span><span class="cx"> #ifdef DEBUG_ALLOC
</span><span class="cx">         if (memory > 500)
</span><del>-                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_CONSOLE, "Session Allocate %d\n", (int) memory);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_core_session_get_uuid(session), SWITCH_LOG_CONSOLE, "Session Allocate %d\n", (int) memory);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx">         ptr = apr_palloc(session->pool, memory);
</span><span class="lines">@@ -250,7 +250,7 @@
</span><span class="cx"> #ifdef DEBUG_ALLOC
</span><span class="cx">         len = strlen(todup);
</span><span class="cx">         if (len > 500)
</span><del>-                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_CONSOLE, "Sess Strdup Allocate %d\n", (int) len);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_core_session_get_uuid(session), SWITCH_LOG_CONSOLE, "Sess Strdup Allocate %d\n", (int) len);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx">         duped = apr_pstrdup(session->pool, todup);
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>