<!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]))) &lt; 3 || !argv[0]) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;-ERR INVALID ARGS!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;-ERR INVALID ARGS!\n&quot;);
</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)) &gt; 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, &quot;INVALID Timeout!\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;INVALID Timeout!\n&quot;);
</ins><span class="cx">                                 goto done;
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         if ((to = atoi(argv[4])) &lt; switch_epoch_time_now(NULL)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;INVALID Timeout!\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;INVALID Timeout!\n&quot;);
</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, &quot;Memory Error!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Memory Error!\n&quot;);
</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 = &quot;,&quot;;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        /* switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;SQL: %s.\n&quot;, sql); */
</del><ins>+        /* switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;SQL: %s.\n&quot;, sql); */
</ins><span class="cx">         
</span><span class="cx">         if (!strcasecmp(as, &quot;delim&quot;) || !strcasecmp(as, &quot;csv&quot;)) {
</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, &quot;No variable name specified.\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</ins><span class="cx">                                         stream-&gt;write_function(stream, &quot;-ERR No variable specified\n&quot;);
</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, &quot;No variable name specified.\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</ins><span class="cx">                                         stream-&gt;write_function(stream, &quot;-ERR No variable specified\n&quot;);
</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-&gt;write_function(stream, &quot;-ERR No variable name specified!\n&quot;);
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</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, &quot;Executing command: %s\n&quot;, cmd);
</del><ins>+    switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Executing command: %s\n&quot;, cmd);
</ins><span class="cx">     if (switch_system(cmd, SWITCH_TRUE) &lt; 0) {
</span><del>-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;Failed to execute command: %s\n&quot;, cmd);
</del><ins>+       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Failed to execute command: %s\n&quot;, cmd);
</ins><span class="cx">     }
</span><span class="cx">     stream-&gt;write_function(stream, &quot;+OK\n&quot;);
</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, &quot;Empty transfer string [%s]\n&quot;, (char *) action-&gt;data);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_ERROR, &quot;Empty transfer string [%s]\n&quot;, (char *) action-&gt;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, &quot;Unable to allocate memory to duplicate transfer data.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_ERROR, &quot;Unable to allocate memory to duplicate transfer data.\n&quot;);
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Transfering to: %s, %s, %s\n&quot;, exten, dialplan, context);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_DEBUG, &quot;Transfering to: %s, %s, %s\n&quot;, exten, dialplan, context);
</ins><span class="cx">         
</span><span class="cx">         switch_ivr_session_transfer(member-&gt;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, &quot;Empty execute app string [%s]\n&quot;, (char *) action-&gt;data);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_ERROR, &quot;Empty execute app string [%s]\n&quot;, (char *) action-&gt;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, &quot;Unable to allocate memory to duplicate execute_app data.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_ERROR, &quot;Unable to allocate memory to duplicate execute_app data.\n&quot;);
</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, &quot;Unable to find application.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_ERROR, &quot;Unable to find application.\n&quot;);
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Execute app: %s, %s\n&quot;, app, arg);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_DEBUG, &quot;Execute app: %s, %s\n&quot;, app, arg);
</ins><span class="cx"> 
</span><span class="cx">         channel = switch_core_session_get_channel(member-&gt;session);
</span><span class="cx">         
</span><span class="lines">@@ -2001,11 +2001,11 @@
</span><span class="cx">         flush_len = switch_samples_per_packet(member-&gt;conference-&gt;rate, member-&gt;conference-&gt;interval) * 10;
</span><span class="cx"> 
</span><span class="cx">         if (switch_core_timer_init(&amp;timer, member-&gt;conference-&gt;timer_name, interval, tsamples, NULL) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Timer Setup Failed.  Conference Cannot Start\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_ERROR, &quot;Timer Setup Failed.  Conference Cannot Start\n&quot;);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Setup timer %s success interval: %u  samples: %u\n&quot;,
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_DEBUG, &quot;Setup timer %s success interval: %u  samples: %u\n&quot;,
</ins><span class="cx">                                           member-&gt;conference-&gt;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-&gt;conference-&gt;dtmf_parser != NULL
</span><span class="cx">                         &amp;&amp; switch_ivr_digit_stream_new(member-&gt;conference-&gt;dtmf_parser, &amp;member-&gt;digit_stream) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Danger Will Robinson, there is no digit parser stream object\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_ERROR, &quot;Danger Will Robinson, there is no digit parser stream object\n&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if ((call_list = switch_channel_get_private(channel, &quot;_conference_autocall_list_&quot;))) {
</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) &amp;&amp; !switch_test_flag(member-&gt;conference, CFLAG_ANSWERED)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Outbound conference channel answered, setting CFLAG_ANSWERED\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_DEBUG, &quot;Outbound conference channel answered, setting CFLAG_ANSWERED\n&quot;);
</ins><span class="cx">                                 switch_set_flag(member-&gt;conference, CFLAG_ANSWERED);
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         if (switch_test_flag(member-&gt;conference, CFLAG_ANSWERED) &amp;&amp; !switch_channel_test_flag(channel, CF_ANSWERED)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;CLFAG_ANSWERED set, answering inbound channel\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_DEBUG, &quot;CLFAG_ANSWERED set, answering inbound channel\n&quot;);
</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-&gt;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-&gt;session),
</ins><span class="cx">                                                           SWITCH_LOG_INFO,
</span><span class="cx">                                                           &quot;executing caller control '%s' param '%s' on call '%u, %s\n&quot;,
</span><span class="cx">                                                           caller_action-&gt;fndesc-&gt;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(&amp;timer);
</span><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Channel leaving conference, cause: %s\n&quot;,
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, &quot;Channel leaving conference, cause: %s\n&quot;,
</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(&amp;pool) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Pool Failure\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_CRIT, &quot;Pool Failure\n&quot;);
</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, &quot;Alloc Failure\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_CRIT, &quot;Alloc Failure\n&quot;);
</ins><span class="cx">                 switch_core_destroy_memory_pool(&amp;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-&gt;pool = pool;
</span><span class="cx">         /* Queue the node */
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Queueing file '%s' for play\n&quot;, file);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_DEBUG, &quot;Queueing file '%s' for play\n&quot;, file);
</ins><span class="cx">         switch_mutex_lock(member-&gt;control_mutex);
</span><span class="cx">         for (nptr = member-&gt;fnode; nptr &amp;&amp; nptr-&gt;next; nptr = nptr-&gt;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(&amp;pool) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Pool Failure\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_CRIT, &quot;Pool Failure\n&quot;);
</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, &quot;Alloc Failure\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_CRIT, &quot;Alloc Failure\n&quot;);
</ins><span class="cx">                 switch_core_destroy_memory_pool(&amp;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(&amp;member-&gt;lsh, conference-&gt;tts_engine, conference-&gt;tts_voice,
</span><span class="cx">                                                                         conference-&gt;rate, conference-&gt;interval, &amp;flags, switch_core_session_get_pool(member-&gt;session)) !=
</span><span class="cx">                         SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Invalid TTS module [%s]!\n&quot;, conference-&gt;tts_engine);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_ERROR, &quot;Invalid TTS module [%s]!\n&quot;, conference-&gt;tts_engine);
</ins><span class="cx">                         return SWITCH_STATUS_FALSE;
</span><span class="cx">                 }
</span><span class="cx">                 member-&gt;sh = &amp;member-&gt;lsh;
</span><span class="lines">@@ -4335,7 +4335,7 @@
</span><span class="cx">         conference_name = conference-&gt;name;
</span><span class="cx"> 
</span><span class="cx">         if (switch_thread_rwlock_tryrdlock(conference-&gt;rwlock) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Read Lock Fail\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Read Lock Fail\n&quot;);
</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, &amp;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, &quot;Cannot create outgoing channel, cause: %s\n&quot;, switch_channel_cause2str(*cause));
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot create outgoing channel, cause: %s\n&quot;, 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, &quot;Conference is gone now, nevermind..\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Conference is gone now, nevermind..\n&quot;);
</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, &quot;Memory Error!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Memory Error!\n&quot;);
</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(&amp;thread, thd_attr, conference_outcall_run, call, pool);
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Launching BG Thread for outcall\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Launching BG Thread for outcall\n&quot;);
</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">                                                            &quot;L16&quot;,
</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-&gt;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-&gt;session), SWITCH_LOG_DEBUG,
</ins><span class="cx">                                                   &quot;Raw Codec Activation Success L16@%uhz 1 channel %dms\n&quot;,
</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, &quot;Raw Codec Activation Failed L16@%uhz 1 channel %dms\n&quot;,
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_DEBUG, &quot;Raw Codec Activation Failed L16@%uhz 1 channel %dms\n&quot;,
</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(&amp;member-&gt;read_resampler,
</span><span class="cx">                                                                    read_impl.actual_samples_per_second,
</span><span class="cx">                                                                    conference-&gt;rate, member-&gt;frame_size, SWITCH_RESAMPLE_QUALITY, 1) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Unable to create resampler!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_CRIT, &quot;Unable to create resampler!\n&quot;);
</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(&amp;member-&gt;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, &quot;Memory Error Creating Audio Buffer!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_CRIT, &quot;Memory Error Creating Audio Buffer!\n&quot;);
</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-&gt;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-&gt;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-&gt;session), SWITCH_LOG_DEBUG,
</ins><span class="cx">                                                   &quot;Raw Codec Activation Success L16@%uhz 1 channel %dms\n&quot;,
</span><span class="cx">                                                   conference-&gt;rate, read_impl.microseconds_per_packet / 1000);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Raw Codec Activation Failed L16@%uhz 1 channel %dms\n&quot;,
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_DEBUG, &quot;Raw Codec Activation Failed L16@%uhz 1 channel %dms\n&quot;,
</ins><span class="cx">                                                   conference-&gt;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(&amp;member-&gt;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, &quot;Memory Error Creating Audio Buffer!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_CRIT, &quot;Memory Error Creating Audio Buffer!\n&quot;);
</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(&amp;member-&gt;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, &quot;Memory Error Creating Audio Buffer!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member-&gt;session), SWITCH_LOG_CRIT, &quot;Memory Error Creating Audio Buffer!\n&quot;);
</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, &quot;Channel has no media!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Channel has no media!\n&quot;);
</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, &quot;Invalid arguments\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Invalid arguments\n&quot;);
</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, &quot;Pool Failure\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Pool Failure\n&quot;);
</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, &quot;Config Error!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Config Error!\n&quot;);
</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, &amp;cfg, params))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Open of %s failed\n&quot;, global_cf_name);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Open of %s failed\n&quot;, 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, &quot;Conference %s already exists!\n&quot;, conf_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Conference %s already exists!\n&quot;, 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-&gt;rwlock) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Read Lock Fail\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Read Lock Fail\n&quot;);
</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 &amp;&amp; pstatus != SWITCH_STATUS_BREAK) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Cannot ask the user for a pin, ending call&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Cannot ask the user for a pin, ending call&quot;);
</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) &amp;&amp; enforce_security) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;Conference %s is locked.\n&quot;, conf_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Conference %s is locked.\n&quot;, conf_name);
</ins><span class="cx">                         if (conference-&gt;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-&gt;max_members &gt; 0) &amp;&amp; (conference-&gt;count &gt;= conference-&gt;max_members)) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;Conference %s is full.\n&quot;, conf_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Conference %s is full.\n&quot;, conf_name);
</ins><span class="cx">                         if (conference-&gt;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, &quot;Usage: %s\n&quot;, SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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, &quot;Usage: %s\n&quot;, SCHED_HEARTBEAT_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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, &quot;Usage: %s\n&quot;, HEARTBEAT_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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">                 &amp;&amp; (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, &quot;Usage: %s\n&quot;, EXE_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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, &quot;%s MKDIR: %s\n&quot;, switch_channel_get_name(switch_core_session_get_channel(session)), data);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;%s MKDIR: %s\n&quot;, 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 &quot;&lt;unhold key&gt; [&lt;moh_a&gt;] [&lt;moh_b&gt;]&quot;
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">                 &amp;&amp; (argc = switch_separate_string(lbuf, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) &gt;= 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, &quot;Usage: %s\n&quot;, SOFT_HOLD_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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 &amp; SBF_EXEC_BLEG)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</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 &amp; SBF_EXEC_ALEG)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</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 &amp; SBF_EXEC_BLEG)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</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 &amp; SBF_EXEC_BLEG) || (bind_flags &amp; SBF_EXEC_ALEG) || (bind_flags &amp; SBF_EXEC_SAME)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</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 &amp; SBF_EXEC_BLEG) || (bind_flags &amp; SBF_EXEC_ALEG) || (bind_flags &amp; SBF_EXEC_SAME)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot bind execute to multiple legs\n&quot;);
</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, &quot;Bind Error!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Bind Error!\n&quot;);
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, BIND_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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, &quot;Usage: %s\n&quot;, INTERCEPT_SYNTAX);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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, &quot;Usage: %s\n&quot;, INTERCEPT_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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, &quot;Usage: %s\n&quot;, eavesdrop_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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, &quot;eavesdrop_require_group&quot;);
</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, &amp;e_data, &amp;errmsg);
</span><span class="cx">                                 if (errmsg) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Error: %s\n&quot;, errmsg);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Error: %s\n&quot;, errmsg);
</ins><span class="cx">                                         switch_core_db_free(errmsg);
</span><span class="cx">                                         if ((file = switch_channel_get_variable(channel, &quot;eavesdrop_indicate_failed&quot;))) {
</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 &lt; e_data.total &amp;&amp; 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, &quot;Spy: %s\n&quot;, e_data.uuid_list[x]);
</del><ins>+                                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Spy: %s\n&quot;, e_data.uuid_list[x]);
</ins><span class="cx">                                                 if ((file = switch_channel_get_variable(channel, &quot;eavesdrop_indicate_new&quot;))) {
</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, &quot;Spy: %s Failed\n&quot;, e_data.uuid_list[x]);
</del><ins>+                                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Spy: %s Failed\n&quot;, e_data.uuid_list[x]);
</ins><span class="cx">                                                                 if ((file = switch_channel_get_variable(channel, &quot;eavesdrop_indicate_failed&quot;))) {
</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, &quot;Usage: %s\n&quot;, threeway_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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 &gt; 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, &quot;Call failed acl check for ip %s on list %s\n&quot;, argv[0], argv[1]);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Call failed acl check for ip %s on list %s\n&quot;, 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, &quot;No B-leg present.\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;No B-leg present.\n&quot;);
</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, &quot;No extension specified.\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No extension specified.\n&quot;);
</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, &quot;Invalid Args\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid Args\n&quot;);
</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, &quot;No time specified.\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No time specified.\n&quot;);
</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, &quot;Invalid Args\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid Args\n&quot;);
</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, &quot;INVALID ARGS!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;INVALID ARGS!\n&quot;);
</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]))) &lt; 2) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;INVALID ARGS!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;INVALID ARGS!\n&quot;);
</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, &quot;No variable name specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</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, &quot;%s SET [%s]=[%s]\n&quot;, switch_channel_get_name(channel), var, expanded ? expanded : &quot;UNDEF&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;%s SET [%s]=[%s]\n&quot;, switch_channel_get_name(channel), var, expanded ? expanded : &quot;UNDEF&quot;);
</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 &amp;&amp; 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, &quot;No variable name specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</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, &quot;SET GLOBAL [%s]=[%s]\n&quot;, var, val ? val : &quot;UNDEF&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;SET GLOBAL [%s]=[%s]\n&quot;, var, val ? val : &quot;UNDEF&quot;);
</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, &quot;No variable name specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</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, &quot;SET_PROFILE_VAR [%s]=[%s]\n&quot;, name, val ? val : &quot;UNDEF&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;SET_PROFILE_VAR [%s]=[%s]\n&quot;, name, val ? val : &quot;UNDEF&quot;);
</ins><span class="cx"> 
</span><span class="cx">                 if (!strcasecmp(name, &quot;dialplan&quot;)) {
</span><span class="cx">                         caller_profile-&gt;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, &quot;No variable name specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</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, &quot;EXPORT %s[%s]=[%s]\n&quot;, local ? &quot;&quot; : &quot;(REMOTE ONLY) &quot;, var_name ? var_name : &quot;&quot;,
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;EXPORT %s[%s]=[%s]\n&quot;, local ? &quot;&quot; : &quot;(REMOTE ONLY) &quot;, var_name ? var_name : &quot;&quot;,
</ins><span class="cx">                                                   val ? val : &quot;UNDEF&quot;);
</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, &quot;No variable name specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;UNSET [%s]\n&quot;, (char *) data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;UNSET [%s]\n&quot;, (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, &quot;%s\n&quot;, log_str);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), ltype, &quot;%s\n&quot;, 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, &amp;buf, SWITCH_FALSE);
</span><span class="cx">                 switch_assert(buf);
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;CHANNEL_DATA:\n%s\n&quot;, buf);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;CHANNEL_DATA:\n%s\n&quot;, buf);
</ins><span class="cx">                 switch_event_destroy(&amp;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, &quot;No privacy mode specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No privacy mode specified.\n&quot;);
</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, &quot;INVALID privacy mode specified. Use a valid mode [no|yes|name|full|number].\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;INVALID privacy mode specified. Use a valid mode [no|yes|name|full|number].\n&quot;);
</ins><span class="cx">                 }
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Set Privacy to %s [%d]\n&quot;, data, caller_profile-&gt;flags);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Set Privacy to %s [%d]\n&quot;, data, caller_profile-&gt;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(&amp;tm, switch_micro_time_now());
</span><span class="cx">                 switch_strftime(date, &amp;retsize, sizeof(date), argv[1], &amp;tm);
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;SET [%s]=[%s]\n&quot;, argv[0], date);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;SET [%s]=[%s]\n&quot;, 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, &quot;menu_handler '%s'\n&quot;, param);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;menu_handler '%s'\n&quot;, 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, &quot;Unable to create menu\n&quot;);
</del><ins>+                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Unable to create menu\n&quot;);
</ins><span class="cx">                                         }
</span><span class="cx">                                 } else {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unable to find menu\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Unable to find menu\n&quot;);
</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, &quot;Open of %s failed\n&quot;, ivr_cf_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Open of %s failed\n&quot;, ivr_cf_name);
</ins><span class="cx">                 }
</span><span class="cx">                 switch_event_destroy(&amp;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, &quot;Executing command: %s\n&quot;, data);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Executing command: %s\n&quot;, data);
</ins><span class="cx">         if (switch_system(data, SWITCH_TRUE) &lt; 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;Failed to execute command: %s\n&quot;, data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Failed to execute command: %s\n&quot;, 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, &quot;INVALID ARGS!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;INVALID ARGS!\n&quot;);
</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]))) &lt; 2) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;INVALID ARGS!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;INVALID ARGS!\n&quot;);
</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)) &gt; 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, &quot;INVALID Timeout!\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;INVALID Timeout!\n&quot;);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         if ((to = atol(argv[3])) &lt; switch_epoch_time_now(NULL)) {
</span><span class="cx">                                 if (to &gt;= 1) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;INVALID Timeout!\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;INVALID Timeout!\n&quot;);
</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, &quot;Enabling tone detection '%s' '%s'\n&quot;, argv[0], argv[1]);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Enabling tone detection '%s' '%s'\n&quot;, 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, &quot;Disabling tone detection\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Disabling tone detection\n&quot;);
</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, &quot;none&quot;)) {
</span><span class="cx">                                 terminators = NULL;
</span><span class="cx">                         }
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Digit %c\n&quot;, dtmf-&gt;digit);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Digit %c\n&quot;, dtmf-&gt;digit);
</ins><span class="cx"> 
</span><span class="cx">                         for (p = terminators; p &amp;&amp; *p; p++) {
</span><span class="cx">                                 if (*p == dtmf-&gt;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, &quot;No timeout specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No timeout specified.\n&quot;);
</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, &quot;Invalid Params!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid Params!\n&quot;);
</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, &quot;Invalid Params!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid Params!\n&quot;);
</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 = &quot;NULL&quot;;
</span><span class="cx">                 }
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Invalid Params! [%s][%s][%s]\n&quot;, engine, voice, text);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid Params! [%s][%s][%s]\n&quot;, 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, &quot;Memory Error!\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Memory Error!\n&quot;);
</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(&quot;uuid_bridge&quot;, id, NULL, &amp;stream);
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;\nHangup Command uuid_bridge(%s):\n%s\n&quot;, id, switch_str_nil((char *) stream.data));
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;\nHangup Command uuid_bridge(%s):\n%s\n&quot;, 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) &amp;&amp; (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, &quot;No arguments specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No arguments specified.\n&quot;);
</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) &amp;&amp; (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, &quot;No arguments specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No arguments specified.\n&quot;);
</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], &amp;args);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, SAY_SYNTAX);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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, &quot;language&quot;);
</span><span class="cx"> 
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Execute %s(%s) lang %s\n&quot;, macro, switch_str_nil(mdata), switch_str_nil(lang));
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Execute %s(%s) lang %s\n&quot;, 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, &quot;Invalid Params!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid Params!\n&quot;);
</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) &amp;&amp; (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, &quot;No file specified.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No file specified.\n&quot;);
</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, &quot;Channel is already up, delaying proxy mode 'till both legs are answered.\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Channel is already up, delaying proxy mode 'till both legs are answered.\n&quot;);
</ins><span class="cx">                                 switch_channel_set_variable(caller_channel, &quot;bypass_media_after_bridge&quot;, &quot;true&quot;);
</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, &amp;peer_session, &amp;cause, data, timelimit, NULL, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Originate Failed.  Cause: %s\n&quot;, switch_channel_cause2str(cause));
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Originate Failed.  Cause: %s\n&quot;, 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), &quot;%u&quot;, cause);
</span><span class="cx">                         
</span><span class="cx">                         if (failure_causes &amp;&amp; !(switch_stristr(cause_str, failure_causes) || strstr(failure_causes, cause_num))) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Failiure causes [%s]:  Cause: %s\n&quot;, failure_causes, cause_str);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Failiure causes [%s]:  Cause: %s\n&quot;, 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 &amp;&amp; (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, &quot;Continue on fail [%s]:  Cause: %s\n&quot;, continue_on_fail, cause_str);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Continue on fail [%s]:  Cause: %s\n&quot;, 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, &quot;as_channel&quot;, &quot;true&quot;);
</span><span class="cx"> 
</span><span class="cx">         if (switch_xml_locate_user(&quot;id&quot;, user, domain, NULL, &amp;xml, &amp;x_domain, &amp;x_user, &amp;x_group, params) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Can't find user [%s@%s]\n&quot;, user, domain);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Can't find user [%s@%s]\n&quot;, 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, &quot;No dial-string available, please check your user directory.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No dial-string available, please check your user directory.\n&quot;);
</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), &quot;user/%s&quot;, user);
</span><span class="cx">                 if (switch_stristr(stupid, d_dest)) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Waddya Daft? You almost called '%s' in an infinate loop!\n&quot;, stupid);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Waddya Daft? You almost called '%s' in an infinate loop!\n&quot;, stupid);
</ins><span class="cx">                         cause = SWITCH_CAUSE_INVALID_IE_CONTENTS;
</span><span class="cx">                 } else if (switch_ivr_originate(session, new_session, &amp;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, &quot;Usage: %s\n&quot;, WAIT_FOR_SILENCE_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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, &amp;results, noat, seperator);
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;EASY ROUTE DEST: [%s]\n&quot;, results.dialstring);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;EASY ROUTE DEST: [%s]\n&quot;, results.dialstring);
</ins><span class="cx">                 switch_channel_set_variable(channel, &quot;easy_destnum&quot;, destnum);
</span><span class="cx">                 switch_channel_set_variable(channel, &quot;easy_dialstring&quot;, results.dialstring);
</span><span class="cx">                 switch_channel_set_variable(channel, &quot;easy_group&quot;, 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, &quot;This function cannot be called from the dialplan.\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;This function cannot be called from the dialplan.\n&quot;);
</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], &quot;noat&quot;)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Entering noat.\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Entering noat.\n&quot;);
</ins><span class="cx">                                 noat = 1;
</span><span class="cx">                         } else if (!strcasecmp(argv[1], &quot;seperator&quot;)) {
</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(&amp;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, &quot;Socket Error 1\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Socket Error 1\n&quot;);
</ins><span class="cx">                 goto fail;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (switch_sockaddr_info_get(&amp;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, &quot;Socket Error 3\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Socket Error 3\n&quot;);
</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, &amp;codec);
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Codec Activation Success\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Codec Activation Success\n&quot;);
</ins><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Codec Activation Fail\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Codec Activation Fail\n&quot;);
</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, &quot;RTP Port Error\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;RTP Port Error\n&quot;);
</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, &quot;soft&quot;, &amp;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, &quot;RTP Error\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;RTP Error\n&quot;);
</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(&amp;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, &quot;Socket Error 2\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Socket Error 2\n&quot;);
</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-&gt;app_mode == FUNCTION_TX) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Fax successfully sent.\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Fax successfully sent.\n&quot;);
</ins><span class="cx">                 } else if (pvt-&gt;app_mode == FUNCTION_RX) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Fax successfully received.\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Fax successfully received.\n&quot;);
</ins><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Fax successfully managed. How ?\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Fax successfully managed. How ?\n&quot;);
</ins><span class="cx">                 }
</span><span class="cx">                 switch_channel_set_variable(channel, &quot;fax_success&quot;, &quot;1&quot;);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Fax processing not successful - result (%d) %s.\n&quot;, result,
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Fax processing not successful - result (%d) %s.\n&quot;, result,
</ins><span class="cx">                                                   t30_completion_code_to_str(result));
</span><span class="cx">                 switch_channel_set_variable(channel, &quot;fax_success&quot;, &quot;0&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Remote station id: %s\n&quot;, far_ident);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Local station id:  %s\n&quot;, local_ident);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Pages transferred: %i\n&quot;, 
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Remote station id: %s\n&quot;, far_ident);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Local station id:  %s\n&quot;, local_ident);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Pages transferred: %i\n&quot;, 
</ins><span class="cx">                 pvt-&gt;app_mode == FUNCTION_TX ? t.pages_rx : t.pages_rx);
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Total fax pages:   %i\n&quot;, t.pages_in_file);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Image resolution:  %ix%i\n&quot;, t.x_resolution, t.y_resolution);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Transfer Rate:     %i\n&quot;, t.bit_rate);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Total fax pages:   %i\n&quot;, t.pages_in_file);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Image resolution:  %ix%i\n&quot;, t.x_resolution, t.y_resolution);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Transfer Rate:     %i\n&quot;, t.bit_rate);
</ins><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;ECM status         %s\n&quot;, (t.error_correcting_mode) ? &quot;on&quot; : &quot;off&quot;);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;remote country:   %s\n&quot;, switch_str_nil(t30_get_rx_country(s)));
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;remote vendor:    %s\n&quot;, switch_str_nil(t30_get_rx_vendor(s)));
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;remote model:     %s\n&quot;, switch_str_nil(t30_get_rx_model(s)));
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;ECM status         %s\n&quot;, (t.error_correcting_mode) ? &quot;on&quot; : &quot;off&quot;);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;remote country:   %s\n&quot;, switch_str_nil(t30_get_rx_country(s)));
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;remote vendor:    %s\n&quot;, switch_str_nil(t30_get_rx_vendor(s)));
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;remote model:     %s\n&quot;, switch_str_nil(t30_get_rx_model(s)));
</ins><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;==============================================================================\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;==============================================================================\n&quot;);
</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-&gt;caller) == NULL) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Cannot initialize my fax structs\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot initialize my fax structs\n&quot;);
</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, &quot;Cannot allocate application private data\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot allocate application private data\n&quot;);
</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, &quot;Cannot allocate application buffer data\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot allocate application buffer data\n&quot;);
</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-&gt;filename = switch_core_session_strdup(session, data);
</span><span class="cx">                 if (pvt-&gt;app_mode == FUNCTION_TX) {
</span><span class="cx">                         if ((switch_file_exists(pvt-&gt;filename, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Cannot send inexistant fax file [%s]\n&quot;, switch_str_nil(pvt-&gt;filename));
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot send inexistant fax file [%s]\n&quot;, switch_str_nil(pvt-&gt;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-&gt;app_mode == FUNCTION_TX) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Fax TX filename not set.\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Fax TX filename not set.\n&quot;);
</ins><span class="cx">                         goto done;
</span><span class="cx">                 } else if (pvt-&gt;app_mode == FUNCTION_RX) {
</span><span class="cx">                         char *fname;
</span><span class="lines">@@ -539,7 +539,7 @@
</span><span class="cx">                                 pvt-&gt;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, &quot;Cannot automatically set fax RX destination file\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot automatically set fax RX destination file\n&quot;);
</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, &quot;Cannot initialize Fax engine\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Cannot initialize Fax engine\n&quot;);
</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, &quot;Raw read codec activation Success L16 %u\n&quot;,
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Raw read codec activation Success L16 %u\n&quot;,
</ins><span class="cx">                                                   read_codec.implementation-&gt;microseconds_per_packet);
</span><span class="cx">                 switch_core_session_set_read_codec(session, &amp;read_codec);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Raw read codec activation Failed L16\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Raw read codec activation Failed L16\n&quot;);
</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, &quot;Raw write codec activation Success L16\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Raw write codec activation Success L16\n&quot;);
</ins><span class="cx">                 write_frame.codec = &amp;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, &quot;Raw write codec activation Failed L16\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Raw write codec activation Failed L16\n&quot;);
</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-&gt;fax_state, (int16_t *) read_frame-&gt;data, read_frame-&gt;samples)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;fax_rx reported an error\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;fax_rx reported an error\n&quot;);
</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-&gt;fax_state, buf, write_codec.implementation-&gt;samples_per_packet)) &lt; 0) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;fax_tx reported an error\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;fax_tx reported an error\n&quot;);
</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, &quot;No audio samples to send\n&quot;); */
</del><ins>+                        /* switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;No audio samples to send\n&quot;); */
</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, &amp;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">                                                           &quot;Cannot write frame [datalen: %d, samples: %d]\n&quot;, 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, &quot;No Args\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No Args\n&quot;);
</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 &amp;&amp; arg_inout)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;USAGE %s\n&quot;, FIFO_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;USAGE %s\n&quot;, FIFO_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (!strcasecmp(arg_inout, &quot;out&quot;)) {
</span><span class="cx">                 consumer = 1;
</span><span class="cx">         } else if (strcasecmp(arg_inout, &quot;in&quot;)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;USAGE %s\n&quot;, FIFO_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;USAGE %s\n&quot;, 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, &quot;USAGE %s\n&quot;, FIFO_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;USAGE %s\n&quot;, FIFO_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (!consumer &amp;&amp; nlist_count &gt; 1) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;USAGE %s\n&quot;, FIFO_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;USAGE %s\n&quot;, 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, &quot;waiting_longer&quot;)) {
</span><span class="cx">                                 strat = STRAT_WAITING_LONGER;
</span><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Invalid strategy\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid strategy\n&quot;);
</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], &quot;nowait&quot;)) {
</span><span class="cx">                                 do_wait = 0;
</span><span class="cx">                         } else if (strcasecmp(argv[2], &quot;wait&quot;)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;USAGE %s\n&quot;, FIFO_USAGE);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;USAGE %s\n&quot;, 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 &amp;&amp; node-&gt;ready == FIFO_DELAY_DESTROY &amp;&amp; node-&gt;consumer_count == 0 &amp;&amp; node-&gt;caller_count == 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;%s removed. (delayed)\n&quot;, node-&gt;name);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;%s removed. (delayed)\n&quot;, node-&gt;name);
</ins><span class="cx">                 switch_core_hash_delete(globals.fifo_hash, node-&gt;name);
</span><span class="cx">                 switch_core_hash_destroy(&amp;node-&gt;caller_hash);
</span><span class="cx">                 switch_core_hash_destroy(&amp;node-&gt;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)) &lt; 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Error opening file %s\n&quot;, (char *) data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Error opening file %s\n&quot;, (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, &quot;Audio Codec Activation Success\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Audio Codec Activation Success\n&quot;);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Audio Codec Activation Fail\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Audio Codec Activation Fail\n&quot;);
</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)) &lt; 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Error opening file %s\n&quot;, (char *) data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Error opening file %s\n&quot;, (char *) data);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (read(fd, &amp;h, sizeof(h)) != sizeof(h)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Error reading file header\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Error reading file header\n&quot;);
</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, &quot;File version does not match!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;File version does not match!\n&quot;);
</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(&amp;timer, &quot;soft&quot;, 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, &quot;Timer Activation Fail\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Timer Activation Fail\n&quot;);
</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, &quot;Audio Codec Activation Success\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Audio Codec Activation Success\n&quot;);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Audio Codec Activation Fail\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Audio Codec Activation Fail\n&quot;);
</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, &quot;Video Codec Activation Success\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Video Codec Activation Success\n&quot;);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Video Codec Activation Fail\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Video Codec Activation Fail\n&quot;);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx">         switch_core_session_set_read_codec(session, &amp;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, &quot;src: %s, dst: %s\n&quot;, src, dst);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;src: %s, dst: %s\n&quot;, src, dst);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Not a valid regexp: %s\n&quot;, src);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Not a valid regexp: %s\n&quot;, 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, &quot;expanded src: %s, dst: %s\n&quot;, src, dst);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;expanded src: %s, dst: %s\n&quot;, src, dst);
</ins><span class="cx">         }
</span><span class="cx">   
</span><span class="cx">         if ((proceed = switch_regex_perform(number, src, &amp;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, &quot;Memory Error!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Memory Error!\n&quot;);
</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-&gt;gw_prefix, cur_route-&gt;prefix
</span><span class="cx">                                                                 , destination_number, cur_route-&gt;suffix, cur_route-&gt;gw_suffix);
</span><span class="cx">                         
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Returning Dialstring %s\n&quot;, data);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Returning Dialstring %s\n&quot;, 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-&gt;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-&gt;session), SWITCH_LOG_CRIT,
</ins><span class="cx">                                                                 &quot;mod_lcr called without a valid session while using a custom_sql that has channel variables.\n&quot;);
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -698,7 +698,7 @@
</span><span class="cx">                                                                 cb_struct-&gt;lookup_number+1, cb_struct-&gt;lookup_number+4,
</span><span class="cx">                                                                 cb_struct-&gt;cid+1, cb_struct-&gt;cid+4);
</span><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;SQL: %s\n&quot;, sql);    
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct-&gt;session), SWITCH_LOG_DEBUG, &quot;SQL: %s\n&quot;, 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(&amp;cb_struct-&gt;dedup_hash, cb_struct-&gt;pool) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error initializing the dedup hash\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct-&gt;session), SWITCH_LOG_ERROR, &quot;Error initializing the dedup hash\n&quot;);
</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-&gt;pool, &quot;rate&quot;);
</span><span class="cx">         }
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;intra routing [state:%d lata:%d] so rate field is [%s]\n&quot;,
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct-&gt;session), SWITCH_LOG_DEBUG, &quot;intra routing [state:%d lata:%d] so rate field is [%s]\n&quot;,
</ins><span class="cx">                                           cb_struct-&gt;intrastate, cb_struct-&gt;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-&gt;session) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;we have a session\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct-&gt;session), SWITCH_LOG_DEBUG, &quot;we have a session\n&quot;);
</ins><span class="cx">                 if ((channel = switch_core_session_get_channel(cb_struct-&gt;session))) {
</span><span class="cx">                         switch_channel_set_variable_var_check(channel, &quot;lcr_rate_field&quot;, rate_field, SWITCH_FALSE);
</span><span class="cx">                         switch_channel_set_variable_var_check(channel, &quot;lcr_query_digits&quot;, 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-&gt;event) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;we have an event\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct-&gt;session), SWITCH_LOG_DEBUG, &quot;we have an event\n&quot;);
</ins><span class="cx">                 switch_event_add_header_string(cb_struct-&gt;event, SWITCH_STACK_BOTTOM, &quot;lcr_rate_field&quot;, rate_field);
</span><span class="cx">                 switch_event_add_header_string(cb_struct-&gt;event, SWITCH_STACK_BOTTOM, &quot;lcr_query_digits&quot;, digits_copy);
</span><span class="cx">                 id_str = switch_core_sprintf(cb_struct-&gt;pool, &quot;%d&quot;, cb_struct-&gt;profile-&gt;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, &quot;SQL: %s\n&quot;, (char *)sql_stream.data);    
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct-&gt;session), SWITCH_LOG_DEBUG, &quot;SQL: %s\n&quot;, (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, &quot;Unknown profile: %s\n&quot;, lcr_profile);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Unknown profile: %s\n&quot;, 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, &quot;intrastate&quot;);
</span><span class="cx">         intralata = switch_channel_get_variable(channel, &quot;intralata&quot;);
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;intrastate channel var is [%s]\n&quot;, intrastate);
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;intralata channel var is [%s]\n&quot;, intralata);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;intrastate channel var is [%s]\n&quot;, intrastate);
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;intralata channel var is [%s]\n&quot;, intralata);
</ins><span class="cx">         if (!switch_strlen_zero(intralata) &amp;&amp; !strcasecmp((char *)intralata, &quot;true&quot;)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Select routes based on intralata rates\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Select routes based on intralata rates\n&quot;);
</ins><span class="cx">                 routes.intralata = SWITCH_FALSE;
</span><span class="cx">         } else if (!switch_strlen_zero(intrastate) &amp;&amp; !strcasecmp((char *)intrastate, &quot;true&quot;)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Select routes based on intrastate rates\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Select routes based on intrastate rates\n&quot;);
</ins><span class="cx">                 routes.intrastate = SWITCH_TRUE;
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Select routes based on interstate rates\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Select routes based on interstate rates\n&quot;);
</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, &quot;LCR Lookup on %s\n&quot;, caller_profile-&gt;destination_number);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;LCR Lookup on %s\n&quot;, caller_profile-&gt;destination_number);
</ins><span class="cx">         routes.lookup_number = caller_profile-&gt;destination_number;
</span><span class="cx">         routes.cid = (char *) caller_profile-&gt;caller_id_number;
</span><span class="cx">         if (lcr_do_lookup(&amp;routes) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 if ((extension = switch_caller_extension_new(session, caller_profile-&gt;destination_number, caller_profile-&gt;destination_number)) == 0) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;memory error!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;memory error!\n&quot;);
</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, &quot;bridge&quot;, cur_route-&gt;dialstring);
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;LCR lookup failed for %s\n&quot;, caller_profile-&gt;destination_number);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;LCR lookup failed for %s\n&quot;, caller_profile-&gt;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, &quot;intrastate&quot;);
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;intrastate channel var is [%s]\n&quot;, intra);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;intrastate channel var is [%s]\n&quot;, intra);
</ins><span class="cx">         if (switch_strlen_zero(intra) || strcasecmp((char *)intra, &quot;true&quot;)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Select routes based on interstate rates\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Select routes based on interstate rates\n&quot;);
</ins><span class="cx">                 routes.intrastate = SWITCH_FALSE;
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Select routes based on intrastate rates\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Select routes based on intrastate rates\n&quot;);
</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, &quot;Unable to locate caller_profile\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Unable to locate caller_profile\n&quot;);
</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, &quot;LCR Lookup on %s using profile %s\n&quot;, dest, lcr_profile);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;LCR Lookup on %s using profile %s\n&quot;, 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, &quot;effective_caller_id_number&quot;);
</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, &quot;Unknown profile: %s\n&quot;, lcr_profile);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Unknown profile: %s\n&quot;, lcr_profile);
</ins><span class="cx">                         goto end;
</span><span class="cx">                 }
</span><span class="cx">                 if (lcr_do_lookup(&amp;routes) == SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -1248,7 +1248,7 @@
</span><span class="cx">                         switch_channel_set_variable(channel, &quot;lcr_auto_route&quot;, rbuf);
</span><span class="cx">                         switch_channel_set_variable(channel, &quot;import&quot;, &quot;lcr_carrier,lcr_rate&quot;);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;LCR lookup failed for %s\n&quot;, dest);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;LCR lookup failed for %s\n&quot;, 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">                                           , &quot;data passed to lcr is [%s]\n&quot;, 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&lt;argc; i++) {
</span><span class="cx">                                 if (!strcasecmp(argv[i], &quot;intrastate&quot;)) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Select routes based on intrastate rates\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Select routes based on intrastate rates\n&quot;);
</ins><span class="cx">                                         cb_struct.intrastate = SWITCH_TRUE;
</span><span class="cx">                                 } else if(!strcasecmp(argv[i], &quot;as&quot;)) {
</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, &quot;Set Caller ID to [%s]\n&quot;, argv[i]);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Set Caller ID to [%s]\n&quot;, 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 = &quot;18005551212&quot;;
</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">                                                           , &quot;Using default CID [%s]\n&quot;, 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-&gt;total_usage--;        
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Usage for %s is now %d\n&quot;, (const char*)key, item-&gt;total_usage);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Usage for %s is now %d\n&quot;, (const char*)key, item-&gt;total_usage);
</ins><span class="cx">                         
</span><span class="cx">                         if (item-&gt;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 &lt; 3 || !argv[0]) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;USAGE: db %s\n&quot;, DB_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;USAGE: db %s\n&quot;, DB_USAGE);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (!strcasecmp(argv[0], &quot;insert&quot;)) {
</span><span class="cx">                 if (argc &lt; 4) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;USAGE: db %s\n&quot;, DB_USAGE);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;USAGE: db %s\n&quot;, DB_USAGE);
</ins><span class="cx">                         return;
</span><span class="cx">                 }
</span><span class="cx">                 sql = switch_mprintf(&quot;delete from db_data where realm='%q' and data_key='%q'&quot;, argv[1], argv[2]);
</span><span class="lines">@@ -490,7 +490,7 @@
</span><span class="cx">         } else if (!strcasecmp(argv[0], &quot;delete&quot;)) {
</span><span class="cx">                 sql = switch_mprintf(&quot;delete from db_data where realm='%q' and data_key='%q'&quot;, argv[1], argv[2]);
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;USAGE: db %s\n&quot;, DB_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;USAGE: db %s\n&quot;, 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, &quot;USAGE: hash %s\n&quot;, HASH_USAGE);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;USAGE: hash %s\n&quot;, 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 &lt; 3 || !argv[0]) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;USAGE: group %s\n&quot;, DB_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;USAGE: group %s\n&quot;, 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 &lt; 3) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;USAGE: limit %s\n&quot;, LIMIT_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;USAGE: limit %s\n&quot;, 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-&gt;rate_usage++;
</span><span class="cx"> 
</span><span class="cx">                         if ((max &gt;= 0) &amp;&amp; (item-&gt;rate_usage &gt; (uint32_t)max)) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Usage for %s exceeds maximum rate of %d/%ds, now at %d\n&quot;, hashkey, max, interval, item-&gt;rate_usage);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Usage for %s exceeds maximum rate of %d/%ds, now at %d\n&quot;, hashkey, max, interval, item-&gt;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 &gt;= 0) &amp;&amp; (item-&gt;total_usage + increment &gt; (uint32_t)max)) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Usage for %s is already at max value (%d)\n&quot;, hashkey, item-&gt;total_usage);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Usage for %s is already at max value (%d)\n&quot;, hashkey, item-&gt;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-&gt;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, &quot;Usage for %s is now %d\n&quot;, hashkey, item-&gt;total_usage);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Usage for %s is now %d\n&quot;, hashkey, item-&gt;total_usage);
</ins><span class="cx">                 } else if (interval == 0) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Usage for %s is now %d/%d\n&quot;, hashkey, item-&gt;total_usage, max);        
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Usage for %s is now %d/%d\n&quot;, hashkey, item-&gt;total_usage, max);        
</ins><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Usage for %s is now %d/%d for the last %d seconds\n&quot;, hashkey, item-&gt;rate_usage, max, interval);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Usage for %s is now %d/%d for the last %d seconds\n&quot;, hashkey, item-&gt;rate_usage, max, interval);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 limit_fire_event(realm, id, item-&gt;total_usage, item-&gt;rate_usage, max, max &gt;=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-&gt;hash, hashkey))) {
</span><span class="cx">                 item-&gt;total_usage--;        
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Usage for %s is now %d\n&quot;, (const char*)hashkey, item-&gt;total_usage);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Usage for %s is now %d\n&quot;, (const char*)hashkey, item-&gt;total_usage);
</ins><span class="cx">         
</span><span class="cx">                 switch_core_hash_delete(pvt-&gt;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 &lt; 2) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;USAGE: limit_hash %s\n&quot;, LIMITHASH_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;USAGE: limit_hash %s\n&quot;, 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 &lt; 2) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;USAGE: limit_hash_execute %s\n&quot;, LIMITHASHEXECUTE_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;USAGE: limit_hash_execute %s\n&quot;, 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, &quot;Missing application\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Missing application\n&quot;);
</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, &quot;Error cloning memcached object&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Error cloning memcached object&quot;);
</ins><span class="cx">                         stream-&gt;write_function(stream, &quot;-ERR Error cloning memcached object\n&quot;);
</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 : &quot;0&quot;, 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, &quot;Initialized inc/dec memcache key: %s to value %d\n&quot;, key, offset);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Initialized inc/dec memcache key: %s to value %d\n&quot;, 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, &amp;ivalue);
</span><span class="cx">                                         } else {
</span><span class="cx">                                                 rc = memcached_decrement(memcached, key, strlen(key), offset, &amp;ivalue);
</span><span class="cx">                                         }
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Someone else created incr/dec memcache key, resubmitting inc/dec request.\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Someone else created incr/dec memcache key, resubmitting inc/dec request.\n&quot;);
</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, &quot;Error while running command %s: %s\n&quot;, subcmd, memcached_strerror(memcached, rc));
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Error while running command %s: %s\n&quot;, subcmd, memcached_strerror(memcached, rc));
</ins><span class="cx">         }
</span><span class="cx">         stream-&gt;write_function(stream, &quot;-ERR %s\n&quot;, 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, &quot;Attempting to bill at $%s per minute to account %s\n&quot;, billrate, billaccount);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Attempting to bill at $%s per minute to account %s\n&quot;, 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-&gt;times-&gt;answered &lt; 1) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Not billing %s - call is not in answered state\n&quot;, billaccount);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Not billing %s - call is not in answered state\n&quot;, 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, &quot;Comparing %f to hangup balance of %f\n&quot;, balance, globals.nobal_amt);
</del><ins>+switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Comparing %f to hangup balance of %f\n&quot;, balance, globals.nobal_amt);
</ins><span class="cx">                 if (balance &lt;= 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, &quot;Balance of %f fell below allowed amount of %f! (Account %s)\n&quot;, balance, globals.nobal_amt, billaccount);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Balance of %f fell below allowed amount of %f! (Account %s)\n&quot;, 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, &quot;Received heartbeat, but we're paused - ignoring\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Received heartbeat, but we're paused - ignoring\n&quot;);
</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-&gt;lastts = profile-&gt;times-&gt;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, &quot;Beginning new billing on %s\n&quot;, uuid);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Beginning new billing on %s\n&quot;, uuid);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Last successful billing time was %s\n&quot;, date);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Last successful billing time was %s\n&quot;, date);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_time_exp_lt(&amp;tm, nibble_data-&gt;lastts);
</span><span class="cx">         switch_strftime_nocheck(date, &amp;retsize, sizeof(date), &quot;%Y-%m-%d %T&quot;, &amp;tm);
</span><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;%d seconds passed since last bill time of %s\n&quot;, (int) ((ts - nibble_data-&gt;lastts) / 1000000), date);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;%d seconds passed since last bill time of %s\n&quot;, (int) ((ts - nibble_data-&gt;lastts) / 1000000), date);
</ins><span class="cx"> 
</span><span class="cx">         if ((ts - nibble_data-&gt;lastts) &gt;= 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-&gt;lastts)) - nibble_data-&gt;bill_adjustments;
</span><span class="cx"> 
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Billing $%f to %s (Call: %s / %f so far)\n&quot;, billamount, billaccount, uuid, nibble_data-&gt;total);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Billing $%f to %s (Call: %s / %f so far)\n&quot;, billamount, billaccount, uuid, nibble_data-&gt;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, &quot;nibble_total_billed&quot;, &quot;%f&quot;, nibble_data-&gt;total);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Failed to log to database!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, &quot;Failed to log to database!\n&quot;);
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Just tried to bill %s negative minutes! That should be impossible.\n&quot;, uuid);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Just tried to bill %s negative minutes! That should be impossible.\n&quot;, 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 &lt;= 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, &quot;Balance of %f fell below allowed amount of %f! (Account %s)\n&quot;, balance, globals.nobal_amt, billaccount);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Balance of %f fell below allowed amount of %f! (Account %s)\n&quot;, 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, &quot;_nibble_data_&quot;);
</span><span class="cx"> 
</span><span class="cx">         if (!nibble_data) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Can't pause - channel is not initialized for billing!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Can't pause - channel is not initialized for billing!\n&quot;);
</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-&gt;pausets == 0)
</span><span class="cx">                 nibble_data-&gt;pausets = ts;
</span><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Paused billing timestamp!\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Paused billing timestamp!\n&quot;);
</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, &quot;_nibble_data_&quot;);
</span><span class="cx"> 
</span><span class="cx">         if (!nibble_data) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Can't resume - channel is not initialized for billing (This is expected at hangup time)!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Can't resume - channel is not initialized for billing (This is expected at hangup time)!\n&quot;);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (nibble_data-&gt;pausets == 0) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Can't resume - channel is not paused! (This is expected at hangup time)\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Can't resume - channel is not paused! (This is expected at hangup time)\n&quot;);
</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 &quot;lost&quot; 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-&gt;bill_adjustments += ((float)atof(billrate) / 1000000 / 60) * ((ts - nibble_data-&gt;pausets));
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Resumed billing! Subtracted %f from this billing cycle.\n&quot;, (atof(billrate) / 1000000 / 60) * ((ts - nibble_data-&gt;pausets)));
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Resumed billing! Subtracted %f from this billing cycle.\n&quot;, (atof(billrate) / 1000000 / 60) * ((ts - nibble_data-&gt;pausets)));
</ins><span class="cx"> 
</span><span class="cx">         nibble_data-&gt;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, &quot;_nibble_data_&quot;);
</span><span class="cx"> 
</span><span class="cx">         if (!nibble_data) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Can't reset - channel is not initialized for billing!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Can't reset - channel is not initialized for billing!\n&quot;);
</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-&gt;lastts = ts;
</span><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Reset last billing timestamp marker to right now!\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Reset last billing timestamp marker to right now!\n&quot;);
</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, &quot;_nibble_data_&quot;);
</span><span class="cx"> 
</span><span class="cx">         if (!nibble_data) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Can't check - channel is not initialized for billing!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Can't check - channel is not initialized for billing!\n&quot;);
</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, &quot;Recorded adjustment to %s for $%f\n&quot;, billaccount, amount);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Recorded adjustment to %s for $%f\n&quot;, billaccount, amount);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Failed to record adjustment to %s for $%f\n&quot;, billaccount, amount);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failed to record adjustment to %s for $%f\n&quot;, 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], &quot;resume&quot;)) {
</span><span class="cx">                         nibblebill_resume(session);
</span><span class="cx">                 } else if (!strcasecmp(argv[0], &quot;check&quot;)) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Current billing is at $%f\n&quot;, nibblebill_check(session));
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Current billing is at $%f\n&quot;, nibblebill_check(session));
</ins><span class="cx">                 } else if (!strcasecmp(argv[0], &quot;reset&quot;)) {
</span><span class="cx">                         nibblebill_reset(session);
</span><span class="cx">                 } else if (!strcasecmp(argv[0], &quot;heartbeat&quot;) &amp;&amp; argc == 2) {
</span><span class="lines">@@ -768,7 +768,7 @@
</span><span class="cx">                                 } else if (!strcasecmp(argv[1], &quot;resume&quot;)) {
</span><span class="cx">                                         nibblebill_resume(psession);
</span><span class="cx">                                 } else if (!strcasecmp(argv[1], &quot;check&quot;)) {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Current billing is at $%f\n&quot;, nibblebill_check(psession));
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;Current billing is at $%f\n&quot;, nibblebill_check(psession));
</ins><span class="cx">                                 } else if (!strcasecmp(argv[1], &quot;reset&quot;)) {
</span><span class="cx">                                         nibblebill_reset(psession);
</span><span class="cx">                                 } else if (!strcasecmp(argv[1], &quot;heartbeat&quot;) &amp;&amp; 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, &amp;cfg, NULL))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Open of %s failed\n&quot;, cf);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Open of %s failed\n&quot;, 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, &quot;No Feeds Specified!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;No Feeds Specified!\n&quot;);
</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, &quot;Codec Error!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Codec Error!\n&quot;);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         memset(&amp;sh, 0, sizeof(sh));
</span><span class="cx">         if (switch_core_speech_open(&amp;sh, engine, voice, rate, interval, &amp;flags, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Invalid TTS module!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid TTS module!\n&quot;);
</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, &quot;Raw Codec Activated\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Raw Codec Activated\n&quot;);
</ins><span class="cx">         } else {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Raw Codec Activation Failed L16@%uhz 1 channel %dms\n&quot;, rate, interval);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Raw Codec Activation Failed L16@%uhz 1 channel %dms\n&quot;, rate, interval);
</ins><span class="cx">                 flags = 0;
</span><span class="cx">                 switch_core_speech_close(&amp;sh, &amp;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(&amp;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, &quot;Setup timer failed!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Setup timer failed!\n&quot;);
</ins><span class="cx">                         switch_core_codec_destroy(&amp;speech_codec);
</span><span class="cx">                         flags = 0;
</span><span class="cx">                         switch_core_speech_close(&amp;sh, &amp;flags);
</span><span class="cx">                         return;
</span><span class="cx">                 }
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Setup timer success %u bytes per %d ms!\n&quot;, (rate / 50) * 2, interval);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Setup timer success %u bytes per %d ms!\n&quot;, (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, &quot;Open of %s failed\n&quot;, filename);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Open of %s failed\n&quot;, 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, &quot;Error [%s]\n&quot;, err);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Error [%s]\n&quot;, 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, &quot;pitch: %f tempo: %f rate: %f\n&quot;,sth-&gt;pitch,sth-&gt;tempo,sth-&gt;rate);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, &quot;pitch: %f tempo: %f rate: %f\n&quot;,sth-&gt;pitch,sth-&gt;tempo,sth-&gt;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, &quot;_soundtouch_&quot;, NULL);
</span><span class="cx">                         switch_core_media_bug_remove(session, &amp;bug);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</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-&gt;send_not_recv ? SMBF_WRITE_REPLACE : SMBF_READ_REPLACE, &amp;bug)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Failure!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failure!\n&quot;);
</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,&quot;No such key in userspy: %s \n&quot;,data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,&quot;No such key in userspy: %s \n&quot;,data);
</ins><span class="cx"> 
</span><span class="cx">         } else {        
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,&quot;Userspy deactivated on %s\n&quot;,data);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,&quot;Userspy deactivated on %s\n&quot;,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,&quot;Can't eavesdrop on uuid %s\n&quot;,spy_uuid);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,&quot;Can't eavesdrop on uuid %s\n&quot;,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,&quot;UserSpy retrieved uuid %s for key %s, activating eavesdrop \n&quot;,uuid,key);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,&quot;UserSpy retrieved uuid %s for key %s, activating eavesdrop \n&quot;,uuid,key);
</ins><span class="cx">         my_uuid = switch_event_get_header(event,&quot;Unique-ID&quot;);
</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,&quot;Spy already exists for %s\n&quot;,argv[0]);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,&quot;Spy already exists for %s\n&quot;,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,&quot;Cant insert to spy hash\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,&quot;Cant insert to spy hash\n&quot;);
</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,&quot;_userspy_&quot;,(void*) argv[0]);
</span><span class="cx">                         switch_channel_add_state_handler(channel,&amp;spy_state_handlers);
</span><span class="cx"> 
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,&quot;UserSpy activated on %s \n&quot;,argv[0]);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE,&quot;UserSpy activated on %s \n&quot;,argv[0]);
</ins><span class="cx"> 
</span><span class="cx">                         if (argv[1]) {
</span><span class="cx">                                 switch_channel_set_variable(channel,&quot;spy_uuid&quot;,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, &quot;Usage: %s\n&quot;, USERSPY_SYNTAX);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, 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-&gt;stress) {
</span><span class="cx">                 switch_event_t *event, *dup;
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Stress %0.2f\n&quot;, sth-&gt;stress);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(switch_core_media_bug_get_session(bug)), SWITCH_LOG_DEBUG, &quot;Stress %0.2f\n&quot;, sth-&gt;stress);
</ins><span class="cx"> 
</span><span class="cx">                 if (switch_event_create(&amp;event, SWITCH_EVENT_DETECTED_SPEECH) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                     switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, &quot;Speech-Type&quot;, &quot;stress-level&quot;);
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">                         switch_event_fire(&amp;dup);
</span><span class="cx">                     }
</span><span class="cx">                     if (switch_core_session_queue_event(sth-&gt;session, &amp;event) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Event queue failed!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(switch_core_media_bug_get_session(bug)), SWITCH_LOG_ERROR, &quot;Event queue failed!\n&quot;);
</ins><span class="cx">                         switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, &quot;delivery-failure&quot;, &quot;true&quot;);
</span><span class="cx">                         switch_event_fire(&amp;event);
</span><span class="cx">                     }
</span><span class="lines">@@ -210,7 +210,7 @@
</span><span class="cx">                         switch_channel_set_private(channel, &quot;_stress_&quot;, NULL);
</span><span class="cx">                         switch_core_media_bug_remove(session, &amp;bug);
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</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-&gt;read ? SMBF_READ_REPLACE : SMBF_WRITE_REPLACE, &amp;bug)) != SWITCH_STATUS_SUCCESS) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Failure!\n&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failure!\n&quot;);
</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, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</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, &amp;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, &quot;Failure hooking to stream\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failure hooking to stream\n&quot;);
</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-&gt;session, &amp;event);
</span><span class="cx">             switch_event_fire(&amp;event_copy);
</span><span class="cx"> 
</span><del>-            switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;&lt;&lt;&lt; VMD - Beep Detected &gt;&gt;&gt;\n&quot;);
</del><ins>+            switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(vmd_info-&gt;session), SWITCH_LOG_INFO, &quot;&lt;&lt;&lt; VMD - Beep Detected &gt;&gt;&gt;\n&quot;);
</ins><span class="cx">             switch_channel_set_variable(channel, &quot;vmd_detect&quot;, &quot;TRUE&quot;);
</span><span class="cx"> 
</span><span class="cx">             vmd_info-&gt;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, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</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, &amp;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, &quot;Failure hooking to stream\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failure hooking to stream\n&quot;);
</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, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Cannot run 2 at once on the same channel!\n&quot;);
</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, &quot;Failure hooking to stream\n&quot;);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failure hooking to stream\n&quot;);
</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 &amp;&amp; (*message_len = fh.sample_count / read_impl.actual_samples_per_second) &lt; profile-&gt;min_record_len) {
</span><span class="cx">                         if (unlink(file_path) != 0) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Failed to delete file [%s]\n&quot;, file_path);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Failed to delete file [%s]\n&quot;, file_path);
</ins><span class="cx">                         }
</span><span class="cx">                         got_file = 0;
</span><span class="cx">                         if (exit_keys &amp;&amp; input[0] &amp;&amp; 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, &quot;Message is less than minimum record length: %d, discarding it.\n&quot;,
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Message is less than minimum record length: %d, discarding it.\n&quot;,
</ins><span class="cx">                                                           profile-&gt;min_record_len);
</span><span class="cx">                         if (switch_channel_ready(channel) &amp;&amp; counter &lt; profile-&gt;max_retries) {
</span><span class="cx">                                 TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, &quot;too-small&quot;, 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, &quot;Failed to open file %s\n&quot;, tmp_path);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failed to open file %s\n&quot;, 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, &quot;Failed to open file %s\n&quot;, announce);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failed to open file %s\n&quot;, 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, &quot;Failed to open file %s\n&quot;, orig);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failed to open file %s\n&quot;, 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, &quot;Failed to delete file [%s]\n&quot;, announce);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Failed to delete file [%s]\n&quot;, 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, &quot;Error merging files\n&quot;);
</del><ins>+                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Error merging files\n&quot;);
</ins><span class="cx">                                                 TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, &quot;deleted&quot;, 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, &quot;%s@%s %s %s %s&quot;, vm_cc, cbt-&gt;domain, new_file_path, cbt-&gt;cid_number, cbt-&gt;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, &quot;Sent Carbon Copy to %s\n&quot;, vm_cc);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Sent Carbon Copy to %s\n&quot;, vm_cc);
</ins><span class="cx">                                         TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, &quot;saved&quot;, NULL, NULL));
</span><span class="cx">                                 } else {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Failed to Carbon Copy to %s\n&quot;, vm_cc);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failed to Carbon Copy to %s\n&quot;, 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-&gt;email, from, header_string, body, cbt-&gt;file_path);
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Sending message to %s\n&quot;, cbt-&gt;email);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Sending message to %s\n&quot;, cbt-&gt;email);
</ins><span class="cx">                                         switch_safe_free(body);
</span><span class="cx">                                         TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, &quot;emailed&quot;, 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, &quot;Failed to delete file [%s]\n&quot;, forward_file_path);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Failed to delete file [%s]\n&quot;, 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(&quot;id&quot;, myid, domain_name, switch_channel_get_variable(channel, &quot;network_addr&quot;),
</span><span class="cx">                                                                                            &amp;x_domain_root, &amp;x_domain, &amp;x_user, NULL, params) != SWITCH_STATUS_SUCCESS) {
</span><del>-                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Can't find user [%s@%s]\n&quot;, myid, domain_name);
</del><ins>+                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Can't find user [%s@%s]\n&quot;, 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, &quot;id&quot;));
</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, &quot;Error creating %s\n&quot;, dir_path);
</del><ins>+                                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Error creating %s\n&quot;, 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 &amp;&amp; switch_strlen_zero(vm_email) &amp;&amp; !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, &quot;No email address, not going to send email.\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;No email address, not going to send email.\n&quot;);
</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 &amp;&amp; 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, &quot;No notify email address, not going to notify.\n&quot;);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;No notify email address, not going to notify.\n&quot;);
</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 &amp;&amp; (!(send_main || send_notify))) {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Falling back to leaving message locally due to too many misconfiguration.\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Falling back to leaving message locally due to too many misconfiguration.\n&quot;);
</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, &quot;Can't find user [%s@%s]\n&quot;, id, domain_name);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Can't find user [%s@%s]\n&quot;, 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, &quot;Error creating %s\n&quot;, dir_path);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Error creating %s\n&quot;, 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-&gt;mutex, sql, sql2str_callback, &amp;callback);
</span><span class="cx"> 
</span><span class="cx">                 if (atoi(disk_usage) &gt;= disk_quota) {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;Voicemail disk quota is exceeded for %s\n&quot;, id);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Voicemail disk quota is exceeded for %s\n&quot;, 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, &quot;vm_cc&quot;))) {
</span><span class="cx">                                 char *cmd = switch_core_session_sprintf(session, &quot;%s %s %s %s&quot;, 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, &quot;Sent Carbon Copy to %s\n&quot;, vm_cc);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, &quot;Sent Carbon Copy to %s\n&quot;, vm_cc);
</ins><span class="cx">                                 } else {
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Failed to Carbon Copy to %s\n&quot;, vm_cc);
</del><ins>+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failed to Carbon Copy to %s\n&quot;, 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, &quot;Failed to deliver message\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failed to deliver message\n&quot;);
</ins><span class="cx">                         TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, &quot;deleted&quot;, 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, &quot;Error Usage: %s\n&quot;, VM_USAGE);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Error Usage: %s\n&quot;, 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, &quot;Error invalid profile %s\n&quot;, profile_name);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Error invalid profile %s\n&quot;, 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, &quot;Send signal %s [%s]\n&quot;, switch_channel_get_name(session-&gt;channel),
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_core_session_get_uuid(session), SWITCH_LOG_DEBUG, &quot;Send signal %s [%s]\n&quot;, switch_channel_get_name(session-&gt;channel),
</ins><span class="cx">                                           SIG_NAMES[sig]);
</span><span class="cx"> 
</span><span class="cx">         if (session-&gt;endpoint_interface-&gt;io_routines-&gt;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 &gt; 500)
</span><del>-                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_CONSOLE, &quot;Session Allocate %d\n&quot;, (int) memory);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_core_session_get_uuid(session), SWITCH_LOG_CONSOLE, &quot;Session Allocate %d\n&quot;, (int) memory);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">         ptr = apr_palloc(session-&gt;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 &gt; 500)
</span><del>-                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_CONSOLE, &quot;Sess Strdup Allocate %d\n&quot;, (int) len);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_core_session_get_uuid(session), SWITCH_LOG_CONSOLE, &quot;Sess Strdup Allocate %d\n&quot;, (int) len);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">         duped = apr_pstrdup(session-&gt;pool, todup);
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>