]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Set log levels on many existing log messages. A huge thanks to James Martelletti...
authorMichael Jerris <mike@jerris.com>
Sun, 16 Apr 2006 06:05:53 +0000 (06:05 +0000)
committerMichael Jerris <mike@jerris.com>
Sun, 16 Apr 2006 06:05:53 +0000 (06:05 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1173 d0543943-73ff-0310-b7d9-9358b9ac24b2

34 files changed:
src/include/switch_types.h
src/mod/applications/mod_bridgecall/mod_bridgecall.c
src/mod/applications/mod_ivrtest/mod_ivrtest.c
src/mod/applications/mod_skel/mod_skel.c
src/mod/asr_tts/mod_cepstral/mod_cepstral.c
src/mod/codecs/mod_g729/mod_g729.c
src/mod/codecs/mod_gsm/mod_gsm.c
src/mod/codecs/mod_ilbc/mod_ilbc.c
src/mod/dialplans/mod_dialplan_demo/mod_dialplan_demo.c
src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
src/mod/dialplans/mod_pcre/mod_pcre.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
src/mod/endpoints/mod_exosip/mod_exosip.c
src/mod/endpoints/mod_iax/mod_iax.c
src/mod/endpoints/mod_opal/mod_opal.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
src/mod/endpoints/mod_woomera/mod_woomera.c
src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
src/mod/event_handlers/mod_event_test/mod_event_test.c
src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c
src/mod/formats/mod_sndfile/mod_sndfile.c
src/mod/languages/mod_perl/mod_perl.c
src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
src/mod/loggers/mod_console/mod_console.c
src/mod/loggers/mod_syslog/mod_syslog.c
src/switch_channel.c
src/switch_core.c
src/switch_event.c
src/switch_ivr.c
src/switch_loadable_module.c
src/switch_resample.c
src/switch_rtp.c

index 1461220f20d92d3c8641c55e81b72dfacc284585..6e19507f4a4dff0c9f770cc59010a5248724b1a1 100644 (file)
@@ -216,7 +216,7 @@ typedef enum {
        SWITCH_LOG_INFO             - Info
        SWITCH_LOG_NOTICE           - Notice
        SWITCH_LOG_WARNING          - Warning
-       SWITCH_LOG_ERR              - Error
+       SWITCH_LOG_ERROR            - Error
        SWITCH_LOG_CRIT             - Critical
        SWITCH_LOG_ALERT            - Alert
        SWITCH_LOG_EMERG            - Emergency
@@ -228,7 +228,7 @@ typedef enum {
        SWITCH_LOG_INFO  = 6,
        SWITCH_LOG_NOTICE = 5,
        SWITCH_LOG_WARNING = 4,
-       SWITCH_LOG_ERR = 3,
+       SWITCH_LOG_ERROR = 3,
        SWITCH_LOG_CRIT = 2,
        SWITCH_LOG_ALERT = 1,
        SWITCH_LOG_EMERG = 0
index 50a5e2e8f36d62b5ac15f57ee3705d49961dc5ae..157628033c2947b403b22914cad4eb8ad6b7dbf9 100644 (file)
@@ -65,7 +65,7 @@ static void audio_bridge_function(switch_core_session *session, char *data)
 
        if (switch_core_session_outgoing_channel(session, chan_type, caller_profile, &peer_session, NULL) !=
                SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Create Outgoing Channel!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
                switch_channel_hangup(caller_channel);
                return;
        } else {
index 02f3e7aa6c8c646b260c99c818537d72d9dc8c86..d1ac8bf14cd84c9e7c9d6577697eefef49ab01a7 100644 (file)
@@ -64,7 +64,7 @@ static void dirtest_function(switch_core_session *session, char *data)
                                                                   "cn=Manager,dc=freeswitch,dc=org",
                                                                   "test",
                                                                   NULL) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't connect\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't connect\n");
                return;
        }
 
@@ -143,7 +143,7 @@ static void ivrtest_function(switch_core_session *session, char *data)
 
        while (switch_channel_get_state(channel) == CS_EXECUTE) {
                memset(buf, 0, sizeof(buf));
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Enter up to 10 digits, press # to terminate, * to hangup\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Enter up to 10 digits, press # to terminate, * to hangup\n");
 
                if (data) {
                        /* you could have passed NULL instead of on_dtmf to get this exact behaviour (copy the digits to buf and stop playing)
@@ -166,7 +166,7 @@ static void ivrtest_function(switch_core_session *session, char *data)
                        break;
                }
                snprintf(say, sizeof(say), "You Dialed [%s]\n", buf);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, say);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, say);
                switch_ivr_speak_text(session, "cepstral", "david", NULL, codec->implementation->samples_per_second, NULL, say, NULL, 0);
        }
        
index 68cdabb9001ef565c360e09656047ce97d780580..0d020cbe2f40b3c9cfede541e4e30ffdb6d7f3c4 100644 (file)
@@ -51,7 +51,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        /* connect my internal structure to the blank pointer passed to me */
        *interface = &skel_module_interface;
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hello World!\n");
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Hello World!\n");
 
        /* indicate that the module should continue to be loaded */
        return SWITCH_STATUS_SUCCESS;
index b58cb15d94a784d348598c1994e5d4d361d7059d..8d168be4da50ca8786a8cde76d803da63f1d1ad6 100644 (file)
@@ -92,7 +92,7 @@ static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_
                }
 
                if (switch_buffer_create(sh->memory_pool, &cepstral->audio_buffer, SWITCH_RECCOMMENDED_BUFFER_SIZE) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Buffer Failed!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Write Buffer Failed!\n");
                        return SWITCH_STATUS_MEMERR;
                }
 
@@ -108,26 +108,26 @@ static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_
 
                /* Open a Swift Port through which to make TTS calls */
                if (SWIFT_FAILED(cepstral->port = swift_port_open(engine, cepstral->params))) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Failed to open Swift Port.");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open Swift Port.");
                        goto all_done;
                }
 
                
                if (voice_name && SWIFT_FAILED(swift_port_set_voice_by_name(cepstral->port, voice_name))) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid voice %s!\n", voice_name);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid voice %s!\n", voice_name);
                        voice_name = NULL;
                }
 
                if (!voice_name) {
                        /* Find the first voice on the system */
                        if ((cepstral->voice = swift_port_find_first_voice(cepstral->port, NULL, NULL)) == NULL) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Failed to find any voices!\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to find any voices!\n");
                                goto all_done;
                        }
 
                        /* Set the voice found by find_first_voice() as the port's current voice */
                        if ( SWIFT_FAILED(swift_port_set_voice(cepstral->port, cepstral->voice)) ) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Failed to set voice.\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to set voice.\n");
                                goto all_done;
                        }
                }
@@ -274,7 +274,7 @@ switch_status switch_module_load(const switch_loadable_module_interface **interf
 
        /* Open the Swift TTS Engine */
        if ( SWIFT_FAILED(engine = swift_engine_open(NULL)) ) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Failed to open Swift Engine.");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open Swift Engine.");
                return SWITCH_STATUS_GENERR;
        }
        
index 9278b96c9468c50e23c05621fe2380e586abbaa7..7a26bd2e3e9c150bdaaa7e63e0419572c8b08ec1 100644 (file)
@@ -117,7 +117,7 @@ static switch_status switch_g729_encode(switch_codec *codec,
                if (new_len <= *encoded_data_len) {
                        *encoded_data_len = new_len;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "buffer overflow!!! %u >= %u\n", new_len, *encoded_data_len);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "buffer overflow!!! %u >= %u\n", new_len, *encoded_data_len);
                        return SWITCH_STATUS_FALSE;
                }
        }
@@ -198,13 +198,13 @@ static switch_status switch_g729_decode(switch_codec *codec,
 
                        } else {
 
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "buffer overflow!!!\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "buffer overflow!!!\n");
                                return SWITCH_STATUS_FALSE;
 
                        }
                } 
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "yo this frame is an odd size [%d]\n", encoded_data_len);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "yo this frame is an odd size [%d]\n", encoded_data_len);
                return SWITCH_STATUS_FALSE;
        }
 
index 9f3f7891aa4f8b7cfb46defc6c8fbeb584c65606..b48b28763bea13bf9c23e1b1252037d5959d9a32 100644 (file)
@@ -90,7 +90,7 @@ static switch_status switch_gsm_encode(switch_codec *codec, switch_codec *other_
                if (new_len <= *encoded_data_len) {
                        *encoded_data_len = new_len;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "buffer overflow!!! %u >= %u\n", new_len, *encoded_data_len);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "buffer overflow!!! %u >= %u\n", new_len, *encoded_data_len);
                        return SWITCH_STATUS_FALSE;
                }
        }
@@ -121,11 +121,11 @@ static switch_status switch_gsm_decode(switch_codec *codec, switch_codec *other_
                if (new_len <= *decoded_data_len) {
                        *decoded_data_len = new_len;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "buffer overflow!!! %u %u\n", new_len, *decoded_data_len);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "buffer overflow!!! %u %u\n", new_len, *decoded_data_len);
                        return SWITCH_STATUS_FALSE;
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "yo this frame is an odd size [%u]\n", encoded_data_len);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "yo this frame is an odd size [%u]\n", encoded_data_len);
        }
        return SWITCH_STATUS_SUCCESS;
 }
index 9ae2f8a1bb2d4e5d78bd18916ddac022e05f7495..dadbd4deac861967d5adc52951dc220d8858f509 100644 (file)
@@ -103,7 +103,7 @@ static switch_status switch_ilbc_encode(switch_codec *codec,
                if (new_len <= *encoded_data_len) {
                        *encoded_data_len = new_len;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "buffer overflow!!! %u >= %u\n", new_len, *encoded_data_len);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "buffer overflow!!! %u >= %u\n", new_len, *encoded_data_len);
                        return SWITCH_STATUS_FALSE;
                }
        }
@@ -144,11 +144,11 @@ static switch_status switch_ilbc_decode(switch_codec *codec,
                if (new_len <= *decoded_data_len) {
                        *decoded_data_len = new_len;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "buffer overflow!!!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "buffer overflow!!!\n");
                        return SWITCH_STATUS_FALSE;
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "yo this frame is an odd size [%d]\n", encoded_data_len);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "yo this frame is an odd size [%d]\n", encoded_data_len);
        }
        return SWITCH_STATUS_SUCCESS;
 }
index 8ba52dab3e4274e144cc5190bdec2d69e54597ef..a891d53cc448962da5e9c0285c14bb9f9325a31d 100644 (file)
@@ -52,11 +52,11 @@ static switch_caller_extension *demo_dialplan_hunt(switch_core_session *session)
        caller_profile = switch_channel_get_caller_profile(channel);
        //switch_channel_set_variable(channel, "pleasework", "yay");
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name,
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name,
                                                  caller_profile->destination_number);
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                switch_channel_hangup(channel);
                return NULL;
        }
@@ -73,14 +73,14 @@ static switch_caller_extension *demo_dialplan_hunt(switch_core_session *session)
                                        *data = '\0';
                                        data++;
                                } else {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "invalid extension on line %d\n", cfg.lineno);
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "invalid extension on line %d\n", cfg.lineno);
                                        continue;
                                }
                                if (!extension) {
                                        if ((extension =
                                                 switch_caller_extension_new(session, caller_profile->destination_number,
                                                                                                         caller_profile->destination_number)) == 0) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "memory error!\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
                                                break;
                                        }
                                }
index 8ae5463ee12b56b8de0569f431b9a26909f13f79..d141f7fbc8f9e9c07ab86dde63db1f44b04d963b 100644 (file)
@@ -58,7 +58,7 @@ static void load_config(void)
        char *var, *val;
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return;
        }
 
@@ -98,7 +98,7 @@ static switch_caller_extension *directory_dialplan_hunt(switch_core_session *ses
 
        caller_profile = switch_channel_get_caller_profile(channel);
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name,
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name,
                                                  caller_profile->destination_number);
        
        
@@ -112,7 +112,7 @@ static switch_caller_extension *directory_dialplan_hunt(switch_core_session *ses
                                                                   globals.dn,
                                                                   globals.pass,
                                                                   NULL) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't connect\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't connect\n");
                return NULL;
        }
 
@@ -126,7 +126,7 @@ static switch_caller_extension *directory_dialplan_hunt(switch_core_session *ses
                                if (!extension) {
                                        if ((extension = switch_caller_extension_new(session, caller_profile->destination_number,
                                                                                                                                  caller_profile->destination_number)) == 0) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "memory error!\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
                                                goto out;
                                        }
                                }
index d9c08dfe79722a0a9738a63dd9f130bc6a972bcf..6c0a6ff87df38b202c7f76d64a273df70cde7aed 100644 (file)
@@ -61,11 +61,11 @@ static switch_caller_extension *dialplan_hunt(switch_core_session *session)
        channel = switch_core_session_get_channel(session);
        caller_profile = switch_channel_get_caller_profile(channel);
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Processing %s->%s!\n", caller_profile->caller_id_name,
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Processing %s->%s!\n", caller_profile->caller_id_name,
                                                  caller_profile->destination_number);
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                switch_channel_hangup(channel);
                return NULL;
        }
@@ -100,7 +100,7 @@ static switch_caller_extension *dialplan_hunt(switch_core_session *session)
                                                          &erroffset,   /* for error offset */
                                                          NULL);        /* use default character tables */
                        if (error) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "COMPILE ERROR: %d [%s]\n", erroffset, error);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "COMPILE ERROR: %d [%s]\n", erroffset, error);
                                cleanre();
                                switch_channel_hangup(channel);
                                return NULL;
@@ -116,7 +116,7 @@ static switch_caller_extension *dialplan_hunt(switch_core_session *session)
                                                                        sizeof(ovector) / sizeof(ovector[0]));  /* number of elements (NOT size in bytes) */
                } else if (match_count > 0 && !strcasecmp(var, "match")) {
                        if (!re) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ERROR: match without regex in %s line %d\n", cfg.path,
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: match without regex in %s line %d\n", cfg.path,
                                                                          cfg.lineno);
                                continue;
                        } else {
@@ -164,7 +164,7 @@ static switch_caller_extension *dialplan_hunt(switch_core_session *session)
                                if (!extension) {
                                        if ((extension =
                                                 switch_caller_extension_new(session, exten_name, caller_profile->destination_number)) == 0) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "memory error!\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
                                                break;
                                        }
                                }
index f9b6e5210c98a63116702fe6a7ab6d5f83c6154d..279095972aa917facc848dc8809996d951aa33c3 100644 (file)
@@ -181,12 +181,12 @@ static void get_codecs(struct private_object *tech_pvt)
                                                                                                                                                         SWITCH_MAX_CODECS,
                                                                                                                                                         globals.codec_order,
                                                                                                                                                         globals.codec_order_last)) <= 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NO codecs?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
                        return;
                }
        } else if (((tech_pvt->num_codecs =
                                 switch_loadable_module_get_codecs(switch_core_session_get_pool(tech_pvt->session), tech_pvt->codecs, SWITCH_MAX_CODECS))) <= 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NO codecs?\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
                return;
        }
 }
@@ -314,7 +314,7 @@ static int do_candidates(struct private_object *tech_pvt, int force)
                                                cand[0].port = tech_pvt->stun_port;
                                        } else {
                                                if (!stun_ip) {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Failed! NO STUN SERVER!\n");
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! NO STUN SERVER!\n");
                                                        switch_channel_hangup(channel);
                                                        return -1;
                                                }
@@ -327,11 +327,11 @@ static int do_candidates(struct private_object *tech_pvt, int force)
                                                                                           SWITCH_STUN_DEFAULT_PORT,
                                                                                           &err,
                                                                                           switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Failed! %s:%d [%s]\n", stun_ip, SWITCH_STUN_DEFAULT_PORT, err);
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! %s:%d [%s]\n", stun_ip, SWITCH_STUN_DEFAULT_PORT, err);
                                                        switch_channel_hangup(channel);
                                                        return -1;
                                                }
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Success %s:%d\n", cand[0].address, cand[0].port);
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Stun Success %s:%d\n", cand[0].address, cand[0].port);
                                        }
                                        cand[0].type = "stun";
                                        tech_pvt->stun_ip = switch_core_session_strdup(tech_pvt->session, cand[0].address);
@@ -983,7 +983,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
                        tech_pvt->codec_index = -1;
                        tech_pvt->local_port = switch_rtp_request_port();
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -1195,7 +1195,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
        assert(handle != NULL);
 
        if (!(profile = ldl_handle_get_private(handle))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ERROR NO PROFILE!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR NO PROFILE!\n");
                return LDL_STATUS_FALSE;
        }
 
@@ -1263,11 +1263,11 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
 
        switch(signal) {
        case LDL_SIGNAL_NONE:
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ERROR\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR\n");
                break;
        case LDL_SIGNAL_MSG:
                if (msg) { 
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "MSG [%s]\n", msg);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "MSG [%s]\n", msg);
                        if (*msg == '+') {
                                switch_channel_queue_dtmf(channel, msg + 1);
                        }
index 74e17307cfb937077ca8afa714bd31ee207b1e1e..a821e223e78929675996bc18827b5ddc78512fab 100644 (file)
@@ -263,7 +263,7 @@ static switch_status exosip_on_init(switch_core_session *session)
                                char *stun_ip = globals.extip + 5;
 
                                if (!stun_ip) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Failed! NO STUN SERVER\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! NO STUN SERVER\n");
                                        switch_channel_hangup(channel);
                                        return SWITCH_STATUS_FALSE;
                                }
@@ -273,11 +273,11 @@ static switch_status exosip_on_init(switch_core_session *session)
                                                                           SWITCH_STUN_DEFAULT_PORT,
                                                                           &err,
                                                                           switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Failed! %s:%d [%s]\n", stun_ip, SWITCH_STUN_DEFAULT_PORT, err);
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! %s:%d [%s]\n", stun_ip, SWITCH_STUN_DEFAULT_PORT, err);
                                        switch_channel_hangup(channel);
                                        return SWITCH_STATUS_FALSE;
                                }
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Success [%s]:[%d]\n", ip, sdp_port);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Stun Success [%s]:[%d]\n", ip, sdp_port);
                        } else {
                                ip = globals.extip;
                        }
@@ -341,7 +341,7 @@ static switch_status exosip_on_init(switch_core_session *session)
                eXosip_lock();
                if ((dest_uri =
                         (char *) switch_core_session_alloc(session, strlen(tech_pvt->caller_profile->destination_number) + 10)) == 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "AIEEEE!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "AIEEEE!\n");
                        assert(dest_uri != NULL);
                }
                sprintf(dest_uri, "sip:%s", tech_pvt->caller_profile->destination_number);
@@ -477,7 +477,7 @@ static switch_status activate_rtp(struct private_object *tech_pvt)
                bw *= 8;
        }
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activating RTP %s:%d->%s:%d codec: %u ms: %d\n",
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activating RTP %s:%d->%s:%d codec: %u ms: %d\n",
                                                  tech_pvt->local_sdp_audio_ip,
                                                  tech_pvt->local_sdp_audio_port,
                                                  tech_pvt->remote_sdp_audio_ip,
@@ -486,13 +486,13 @@ static switch_status activate_rtp(struct private_object *tech_pvt)
 
        if (tech_pvt->realm) {
                if (!(key = (char *) switch_core_hash_find(globals.srtp_hash, tech_pvt->realm))) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "undefined Realm %s\n", tech_pvt->realm);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "undefined Realm %s\n", tech_pvt->realm);
                        switch_channel_hangup(channel);
                        switch_set_flag(tech_pvt, TFLAG_BYE);
                        switch_clear_flag(tech_pvt, TFLAG_IO);
                        return SWITCH_STATUS_FALSE;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "using Realm %s\n", tech_pvt->realm);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "using Realm %s\n", tech_pvt->realm);
                }
        }
 
@@ -512,7 +512,7 @@ static switch_status activate_rtp(struct private_object *tech_pvt)
                switch_set_flag(tech_pvt, TFLAG_RTP);
        } else {
                switch_channel *channel = switch_core_session_get_channel(tech_pvt->session);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP REPORTS ERROR: [%s]\n", err);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err);
                switch_channel_hangup(channel);
                switch_set_flag(tech_pvt, TFLAG_BYE);
                switch_clear_flag(tech_pvt, TFLAG_IO);
@@ -884,7 +884,7 @@ static switch_status exosip_receive_message(switch_core_session *session, switch
                                char *buf = NULL;
                                osip_message_t *progress = NULL;
 
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Asked to send early media by %s\n", msg->from);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Asked to send early media by %s\n", msg->from);
 
                                /* Transmit 183 Progress with SDP */
                                eXosip_lock();
@@ -963,7 +963,7 @@ static switch_status exosip_outgoing_channel(switch_core_session *session, switc
                        switch_core_session_set_private(*new_session, tech_pvt);
                        tech_pvt->session = *new_session;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -1029,7 +1029,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
 
 
        if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                return SWITCH_STATUS_TERM;
        }
 
@@ -1095,7 +1095,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
                        switch_core_session_set_private(session, tech_pvt);
                        tech_pvt->session = session;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(&session);
                        return SWITCH_STATUS_MEMERR;
                }
@@ -1154,7 +1154,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
                
 
                if ((remote_sdp = eXosip_get_sdp_info(event->request)) == 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Find Remote SDP!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Find Remote SDP!\n");
                        exosip_on_hangup(session);
                        switch_core_session_destroy(&session);
                        return SWITCH_STATUS_GENERR;
@@ -1175,7 +1175,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
                        if (!strncasecmp(globals.extip, "stun:", 5)) {
                                char *stun_ip = globals.extip + 5;
                                if (!stun_ip) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Failed! NO STUN SERVER\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! NO STUN SERVER\n");
                                        switch_channel_hangup(channel);
                                        return SWITCH_STATUS_FALSE;
                                }
@@ -1185,11 +1185,11 @@ static switch_status exosip_create_call(eXosip_event_t * event)
                                                                           SWITCH_STUN_DEFAULT_PORT,
                                                                           &err,
                                                                           switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Failed! %s:%d [%s]\n", stun_ip, SWITCH_STUN_DEFAULT_PORT, err);
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! %s:%d [%s]\n", stun_ip, SWITCH_STUN_DEFAULT_PORT, err);
                                        switch_channel_hangup(channel);
                                        return SWITCH_STATUS_FALSE;
                                }
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Success [%s]:[%d]\n", ip, sdp_port);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Stun Success [%s]:[%d]\n", ip, sdp_port);
                        } else {
                                ip = globals.extip;
                        }
@@ -1236,7 +1236,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
                while (0 == osip_rfc3264_match(tech_pvt->sdp_config, remote_sdp, audio_tab, video_tab, t38_tab, app_tab, mline)) {
                        if (audio_tab[0] == NULL && video_tab[0] == NULL && t38_tab[0] == NULL && app_tab[0] == NULL) {
 
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Got no compatible codecs!\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Got no compatible codecs!\n");
                                break;
                        }
                        for (pos = 0; audio_tab[pos] != NULL; pos++) {
@@ -1287,7 +1287,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
                                                                           1,
                                                                           SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                                                           NULL, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                                switch_channel_hangup(channel);
                                return SWITCH_STATUS_FALSE;
                        } else {
@@ -1298,7 +1298,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
                                                                                   1,
                                                                                   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                                                                   NULL, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                                        switch_channel_hangup(channel);
                                        return SWITCH_STATUS_FALSE;
                                } else {
@@ -1306,7 +1306,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
                                        tech_pvt->read_frame.rate = rate;
                                        switch_set_flag(tech_pvt, TFLAG_USING_CODEC);
                                        ms = tech_pvt->write_codec.implementation->microseconds_per_frame / 1000;
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activate Inbound Codec %s/%d %d ms\n", dname, rate, ms);
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activate Inbound Codec %s/%d %d ms\n", dname, rate, ms);
                                        tech_pvt->read_frame.codec = &tech_pvt->read_codec;
                                        switch_core_session_set_read_codec(session, &tech_pvt->read_codec);
                                        switch_core_session_set_write_codec(session, &tech_pvt->write_codec);
@@ -1328,7 +1328,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
                        return SWITCH_STATUS_FALSE;
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Create new Inbound Channel!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create new Inbound Channel!\n");
                return SWITCH_STATUS_FALSE;
        }
 
@@ -1343,7 +1343,7 @@ static void destroy_call_by_event(eXosip_event_t * event)
        switch_channel *channel = NULL;
 
        if ((tech_pvt = get_pvt_by_call_id(event->cid)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Um in case you are interested, Can't find the pvt [%d]!\n",
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Um in case you are interested, Can't find the pvt [%d]!\n",
                                                          event->cid);
                return;
        }
@@ -1386,7 +1386,7 @@ static switch_status parse_sdp_media(sdp_media_t * media, char **dname, char **d
                                *dname = strdup("L16");
                                *drate = strdup("8000");
                        }
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Found negotiated codec Payload: %s Name: %s Rate: %s\n",
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Found negotiated codec Payload: %s Name: %s Rate: %s\n",
                                                                  *dpayload, *dname, *drate);
                        break;
                }
@@ -1409,7 +1409,7 @@ static void handle_answer(eXosip_event_t * event)
 
 
        if ((tech_pvt = get_pvt_by_call_id(event->cid)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Um in case you are interested, Can't find the pvt!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Um in case you are interested, Can't find the pvt!\n");
                return;
        }
 
@@ -1417,14 +1417,14 @@ static void handle_answer(eXosip_event_t * event)
        assert(channel != NULL);
 
        if (!event->response) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Someone answered... with no SDP information - WTF?!?\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Someone answered... with no SDP information - WTF?!?\n");
                switch_channel_hangup(channel);
                return;
        }
 
        /* Get all of the remote SDP elements... stuff */
        if ((remote_sdp = eXosip_get_sdp_info(event->response)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cant Find SDP?\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cant Find SDP?\n");
                switch_channel_hangup(channel);
                return;
        }
@@ -1458,7 +1458,7 @@ static void handle_answer(eXosip_event_t * event)
                                                                   1,
                                                                   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                                                   NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                        switch_channel_hangup(channel);
                        return;
                } else {
@@ -1470,7 +1470,7 @@ static void handle_answer(eXosip_event_t * event)
                                                                           SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                                                           NULL,
                                                                           switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                                switch_channel_hangup(channel);
                                return;
                        } else {
@@ -1478,7 +1478,7 @@ static void handle_answer(eXosip_event_t * event)
                                tech_pvt->read_frame.rate = rate;
                                switch_set_flag(tech_pvt, TFLAG_USING_CODEC);
                                ms = tech_pvt->write_codec.implementation->microseconds_per_frame / 1000;
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activate Outbound Codec %s/%d %d ms\n", dname, rate, ms);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activate Outbound Codec %s/%d %d ms\n", dname, rate, ms);
                                tech_pvt->read_frame.codec = &tech_pvt->read_codec;
                                switch_core_session_set_read_codec(tech_pvt->session, &tech_pvt->read_codec);
                                switch_core_session_set_write_codec(tech_pvt->session, &tech_pvt->write_codec);
@@ -1641,7 +1641,7 @@ static int config_exosip(int reload)
 
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
@@ -1724,12 +1724,12 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
        }
 
        if (eXosip_init()) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "eXosip_init initialization failed!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "eXosip_init initialization failed!\n");
                return SWITCH_STATUS_TERM;
        }
 
        if (eXosip_listen_addr(IPPROTO_UDP, NULL, globals.port, AF_INET, 0)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "eXosip_listen_addr failed!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "eXosip_listen_addr failed!\n");
                return SWITCH_STATUS_TERM;
        }
 
@@ -1755,14 +1755,14 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                switch (event->type) {
                case EXOSIP_CALL_INVITE:
                        if (exosip_create_call(event) != SWITCH_STATUS_SUCCESS) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "invite failure\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invite failure\n");
                                destroy_call_by_event(event);
                        }
                        break;
                case EXOSIP_CALL_REINVITE:
                        /* See what the reinvite is about - on hold or whatever */
                        //handle_reinvite(event);
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Got a reinvite.\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Got a reinvite.\n");
                        break;
                case EXOSIP_CALL_MESSAGE_NEW:
                        if (event->request != NULL && MSG_IS_REFER(event->request)) {
@@ -1773,7 +1773,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                        /* If audio is not flowing and this has SDP - fire it up! */
                        break;
                case EXOSIP_CALL_ANSWERED:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "The call was answered.\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "The call was answered.\n");
                        handle_answer(event);
                        break;
                case EXOSIP_CALL_PROCEEDING:
@@ -1783,7 +1783,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                        //handle_ringing(event);
                        break;
                case EXOSIP_CALL_REDIRECTED:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call was redirect\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Call was redirect\n");
                        break;
                case EXOSIP_CALL_CLOSED:
                        destroy_call_by_event(event);
@@ -1792,24 +1792,24 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                        destroy_call_by_event(event);
                        break;
                case EXOSIP_CALL_NOANSWER:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "The call was not answered.\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "The call was not answered.\n");
                        destroy_call_by_event(event);
                        break;
                case EXOSIP_CALL_REQUESTFAILURE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Request failure\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Request failure\n");
                        destroy_call_by_event(event);
                        break;
                case EXOSIP_CALL_SERVERFAILURE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Server failure\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Server failure\n");
                        destroy_call_by_event(event);
                        break;
                case EXOSIP_CALL_GLOBALFAILURE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Global failure\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Global failure\n");
                        destroy_call_by_event(event);
                        break;
                        /* Registration related stuff */
                case EXOSIP_REGISTRATION_NEW:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Received registration attempt\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Received registration attempt\n");
                        break;
                default:
                        /* Unknown event... casually absorb it for now */
index d5108fe2cafa14cacc7cac32a8667b39ddc39487..c369f59264416d525ee5590e495deea16ca3cb4e 100644 (file)
@@ -191,7 +191,7 @@ static unsigned short iax_build_codec_rates(void)
                        samples |= IAX_RATE_48KHZ;
                        break;
                default:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "I don't know rate %d\n", rate);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "I don't know rate %d\n", rate);
                        break;
                }
        }
@@ -221,13 +221,13 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
                                                                                                                                        SWITCH_MAX_CODECS,
                                                                                                                                        globals.codec_order,
                                                                                                                                        globals.codec_order_last)) <= 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NO codecs?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
                        return SWITCH_STATUS_GENERR;
                }
        } else
                if (((num_codecs =
                         switch_loadable_module_get_codecs(switch_core_session_get_pool(tech_pvt->session), codecs, SWITCH_MAX_CODECS))) <= 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NO codecs?\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -274,7 +274,7 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
                                strncat(pref_str, x == len - 1 ? ")" : ",", sizeof(pref_str));
                        }
 
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec Prefs Detected: %s\n", pref_str);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Codec Prefs Detected: %s\n", pref_str);
 
                        for (x = 0; x < len; x++) {
                                if ((prefs[x] & mixed_cap)) {
@@ -310,7 +310,7 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
        }
 
        if (!dname && !chosen) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NO codecs?\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -352,7 +352,7 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
                                                           1,
                                                           SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                                           NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                return SWITCH_STATUS_GENERR;
        } else {
                if (switch_core_codec_init(&tech_pvt->write_codec,
@@ -362,7 +362,7 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
                                                                   1,
                                                                   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                                                   NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                        switch_core_codec_destroy(&tech_pvt->read_codec);
                        return SWITCH_STATUS_GENERR;
                } else {
@@ -371,7 +371,7 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
                        ms = tech_pvt->write_codec.implementation->microseconds_per_frame / 1000;
                        rate = tech_pvt->write_codec.implementation->samples_per_second;
                        tech_pvt->read_frame.rate = rate;
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activate Codec %s/%d %d ms\n", dname, rate, ms);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activate Codec %s/%d %d ms\n", dname, rate, ms);
                        tech_pvt->read_frame.codec = &tech_pvt->read_codec;
                        switch_core_session_set_read_codec(tech_pvt->session, &tech_pvt->read_codec);
                        switch_core_session_set_write_codec(tech_pvt->session, &tech_pvt->write_codec);
@@ -404,7 +404,7 @@ static switch_status channel_kill_channel(switch_core_session *session, int sig)
 
 static void iax_err_cb(const char *s)
 {
-       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "IAX  ERR: %s", s);
+       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "IAX  ERR: %s", s);
 }
 
 static void iax_out_cb(const char *s)
@@ -739,7 +739,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
                        switch_core_session_set_private(*new_session, tech_pvt);
                        tech_pvt->session = *new_session;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -754,7 +754,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
                        switch_channel_set_caller_profile(channel, caller_profile);
                        tech_pvt->caller_profile = caller_profile;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! no caller profile\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -792,7 +792,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
 {
 
        if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                return SWITCH_STATUS_TERM;
        }
 
@@ -822,7 +822,7 @@ static switch_status load_config(void)
        memset(&globals, 0, sizeof(globals));
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
@@ -878,7 +878,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                iax_enable_debug();
        }
        if (iax_init(globals.ip, globals.port) < 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error Binding Port!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Binding Port!\n");
                return SWITCH_STATUS_TERM;
        }
 
@@ -886,7 +886,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
        iax_set_output(iax_out_cb);
        //netfd = iax_get_fd();
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "IAX Ready Port %d\n", globals.port);
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "IAX Ready Port %d\n", globals.port);
 
        if (switch_event_create(&s_event, SWITCH_EVENT_PUBLISH) == SWITCH_STATUS_SUCCESS) {
                switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "service", "_iax2._udp");
@@ -913,12 +913,12 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                        }
                        switch (iaxevent->etype) {
                        case IAX_EVENT_REGACK:
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Registration completed successfully.\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Registration completed successfully.\n");
                                //if (iaxevent->ies.refresh)
                                //refresh = iaxevent->ies.refresh;
                                break;
                        case IAX_EVENT_REGREJ:
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Registration failed.\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Registration failed.\n");
                                break;
                        case IAX_EVENT_TIMEOUT:
                                break;
@@ -929,16 +929,16 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
 
                                        if (iax_set_codec(tech_pvt, iaxevent->session, &format, &cap, &iaxevent->ies.samprate, IAX_SET) !=
                                                SWITCH_STATUS_SUCCESS) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WTF? %u %u\n", iaxevent->ies.format,
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "WTF? %u %u\n", iaxevent->ies.format,
                                                                                          iaxevent->ies.capability);
                                        }
                                }
 
 
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call accepted.\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Call accepted.\n");
                                break;
                        case IAX_EVENT_RINGA:
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Ringing heard.\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Ringing heard.\n");
                                break;
                        case IAX_EVENT_PONG:
                                // informative only
@@ -949,10 +949,10 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                                        switch_channel *channel;
                                        if ((channel = switch_core_session_get_channel(tech_pvt->session)) != 0) {
                                                if (switch_channel_test_flag(channel, CF_ANSWERED)) {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WTF Mutiple Answer %s?\n",
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "WTF Mutiple Answer %s?\n",
                                                                                                  switch_channel_get_name(channel));
                                                } else {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Answer %s\n",
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Answer %s\n",
                                                                                                  switch_channel_get_name(channel));
                                                        switch_channel_answer(channel);
                                                }
@@ -962,7 +962,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                                break;
                        case IAX_EVENT_CONNECT:
                                // incoming call detected
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,
                                                                          "Incoming call connected %s, %s, %s %u/%u\n",
                                                                          iaxevent->ies.called_number,
                                                                          iaxevent->ies.calling_number,
@@ -971,7 +971,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                                if (iaxevent) {
                                        switch_core_session *session;
 
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "New Inbound Channel %s!\n",
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "New Inbound Channel %s!\n",
                                                                                  iaxevent->ies.calling_name);
                                        if ((session = switch_core_session_request(&channel_endpoint_interface, NULL)) != 0) {
                                                struct private_object *tech_pvt;
@@ -986,7 +986,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                                                        switch_core_session_set_private(session, tech_pvt);
                                                        tech_pvt->session = session;
                                                } else {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                                                        switch_core_session_destroy(&session);
                                                        break;
                                                }
@@ -1025,7 +1025,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                                }
                                break;
                        case IAX_EVENT_REJECT:
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Rejected call.\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Rejected call.\n");
                        case IAX_EVENT_BUSY:
                        case IAX_EVENT_HANGUP:
                                if (tech_pvt) {
@@ -1034,7 +1034,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                                        switch_clear_flag(tech_pvt, TFLAG_IO);
                                        switch_clear_flag(tech_pvt, TFLAG_VOICE);
                                        if ((channel = switch_core_session_get_channel(tech_pvt->session)) != 0) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hangup %s\n", switch_channel_get_name(channel));
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Hangup %s\n", switch_channel_get_name(channel));
                                                switch_set_flag(tech_pvt, TFLAG_HANGUP);
                                                switch_channel_hangup(channel);
                                                //switch_thread_cond_signal(tech_pvt->cond);
@@ -1047,7 +1047,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                                break;
                        case IAX_EVENT_CNG:
                                // pseudo-silence
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "sending silence\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "sending silence\n");
                                break;
                        case IAX_EVENT_VOICE:
                                if (tech_pvt && (tech_pvt->read_frame.datalen = iaxevent->datalen) != 0) {
@@ -1065,7 +1065,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                                }
                                break;
                        case IAX_EVENT_TRANSFER:
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call transfer occurred.\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Call transfer occurred.\n");
                                //session[0] = iaxevent->session;
                                break;
                        case IAX_EVENT_DTMF:
@@ -1074,7 +1074,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
                                        if ((channel = switch_core_session_get_channel(tech_pvt->session)) != 0) {
                                                char str[2] = { (char)iaxevent->subclass };
                                                if (globals.debug) {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s DTMF %s\n", str,
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s DTMF %s\n", str,
                                                                                                  switch_channel_get_name(channel));
                                                }
                                                switch_channel_queue_dtmf(channel, str);
index 8388977a4078584345ed31c52a6d5f23a5c9cf49..ea44d0bbc3960f19d7a0ae458cc1665ed008b661 100644 (file)
@@ -196,7 +196,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
                        switch_core_session_set_private(*new_session, tech_pvt);
                        tech_pvt->session = *new_session;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -209,7 +209,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
                        snprintf(name, sizeof(name), "Opal/%s-%04x", caller_profile->destination_number, rand() & 0xffff);
                        switch_channel_set_name(channel, name);
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! no caller profile\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -355,7 +355,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        memset(&globals, 0, sizeof(globals));
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
@@ -374,7 +374,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
 
 
        if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                return SWITCH_STATUS_TERM;
        }
 
index 0f2f163d673bb0d4f6365b0b32a8bde6e9571796..2df3814026ccdcad7fcc93d79ea675d0385a7ef1 100644 (file)
@@ -491,7 +491,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
                        switch_core_session_set_private(*new_session, tech_pvt);
                        tech_pvt->session = *new_session;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -507,7 +507,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
                        switch_channel_set_caller_profile(channel, caller_profile);
                        tech_pvt->caller_profile = caller_profile;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! no caller profile\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -527,7 +527,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
 {
 
        if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                return SWITCH_STATUS_TERM;
        }
 
@@ -540,7 +540,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        dump_info();
 
        if (switch_event_reserve_subclass(MY_EVENT_RINGING) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't register subclass!");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass!");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -561,7 +561,7 @@ static switch_status load_config(void)
        memset(&globals, 0, sizeof(globals));
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
@@ -632,7 +632,7 @@ static int get_dev_by_name(char *name, int in)
        numDevices = Pa_CountDevices();
 
        if (numDevices < 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "ERROR: Pa_CountDevices returned 0x%x\n", numDevices);
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "ERROR: Pa_CountDevices returned 0x%x\n", numDevices);
                return -2;
        }
 
@@ -658,55 +658,55 @@ static int dump_info(void)
        PaError err;
        numDevices = Pa_CountDevices();
        if (numDevices < 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "ERROR: Pa_CountDevices returned 0x%x\n", numDevices);
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "ERROR: Pa_CountDevices returned 0x%x\n", numDevices);
                err = numDevices;
                goto error;
        }
-       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Number of devices = %d\n", numDevices);
+       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Number of devices = %d\n", numDevices);
        for (i = 0; i < numDevices; i++) {
                pdi = Pa_GetDeviceInfo(i);
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "---------------------------------------------- #%d", i);
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "---------------------------------------------- #%d", i);
                if (i == Pa_GetDefaultInputDeviceID())
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, " DefaultInput");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, " DefaultInput");
                if (i == Pa_GetDefaultOutputDeviceID())
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, " DefaultOutput");
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "\nName         = %s\n", pdi->name);
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Max Inputs   = %d", pdi->maxInputChannels);
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, ", Max Outputs = %d\n", pdi->maxOutputChannels);
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, " DefaultOutput");
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "\nName         = %s\n", pdi->name);
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Max Inputs   = %d", pdi->maxInputChannels);
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, ", Max Outputs = %d\n", pdi->maxOutputChannels);
                if (pdi->numSampleRates == -1) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Sample Rate Range = %f to %f\n", pdi->sampleRates[0],
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Sample Rate Range = %f to %f\n", pdi->sampleRates[0],
                                                                  pdi->sampleRates[1]);
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Sample Rates =");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Sample Rates =");
                        for (j = 0; j < pdi->numSampleRates; j++) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, " %8.2f,", pdi->sampleRates[j]);
+                               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, " %8.2f,", pdi->sampleRates[j]);
                        }
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "\n");
                }
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Native Sample Formats = ");
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Native Sample Formats = ");
                if (pdi->nativeSampleFormats & paInt8)
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paInt8, ");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paInt8, ");
                if (pdi->nativeSampleFormats & paUInt8)
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paUInt8, ");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paUInt8, ");
                if (pdi->nativeSampleFormats & paInt16)
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paInt16, ");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paInt16, ");
                if (pdi->nativeSampleFormats & paInt32)
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paInt32, ");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paInt32, ");
                if (pdi->nativeSampleFormats & paFloat32)
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paFloat32, ");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paFloat32, ");
                if (pdi->nativeSampleFormats & paInt24)
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paInt24, ");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paInt24, ");
                if (pdi->nativeSampleFormats & paPackedInt24)
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paPackedInt24, ");
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paPackedInt24, ");
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "\n");
        }
 
-       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "----------------------------------------------\n");
+       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "----------------------------------------------\n");
        return 0;
   error:
-       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "An error occured while using the portaudio stream\n");
-       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Error number: %d\n", err);
-       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Error message: %s\n", Pa_GetErrorText(err));
+       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "An error occured while using the portaudio stream\n");
+       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Error number: %d\n", err);
+       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Error message: %s\n", Pa_GetErrorText(err));
        return err;
 }
 
@@ -726,7 +726,7 @@ static switch_status engage_device(struct private_object *tech_pvt)
                                                           1,
                                                           SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                                           NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                return SWITCH_STATUS_FALSE;
        } else {
                if (switch_core_codec_init(&tech_pvt->write_codec,
@@ -736,12 +736,12 @@ static switch_status engage_device(struct private_object *tech_pvt)
                                                                   1,
                                                                   SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                                                   NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                        switch_core_codec_destroy(&tech_pvt->read_codec);
                        return SWITCH_STATUS_FALSE;
                }
        }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Loaded codec L16 %dhz %dms on %s\n", sample_rate, codec_ms,
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Loaded codec L16 %dhz %dms on %s\n", sample_rate, codec_ms,
                                                  switch_channel_get_name(channel));
        tech_pvt->read_frame.rate = sample_rate;
        tech_pvt->read_frame.codec = &tech_pvt->read_codec;
@@ -758,12 +758,12 @@ static switch_status engage_device(struct private_object *tech_pvt)
                if ((tech_pvt->err =
                         OpenAudioStream(&tech_pvt->audio_out, sample_rate, SAMPLE_TYPE, PABLIO_WRITE | PABLIO_MONO, -1,
                                                         tech_pvt->outdev)) != paNoError) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't open audio out [%d]!\n", tech_pvt->outdev);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open audio out [%d]!\n", tech_pvt->outdev);
                        CloseAudioStream(tech_pvt->audio_in);
                        tech_pvt->audio_in = NULL;
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't open audio in [%d]!\n", tech_pvt->indev);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open audio in [%d]!\n", tech_pvt->indev);
        }
        switch_mutex_unlock(globals.device_lock);
 
@@ -803,7 +803,7 @@ static switch_status place_call(char *dest, char *out, size_t outlen)
                        switch_core_session_set_private(session, tech_pvt);
                        tech_pvt->session = session;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(&session);
                        return SWITCH_STATUS_FALSE;
                }
index d1cfea4bbd2eee6a1669c598702e472ce755d273..62e4db84edb05ae7e5ab473d9697eab446d9c4e7 100644 (file)
@@ -250,7 +250,7 @@ static switch_status wanpipe_on_init(switch_core_session *session)
                mtu_mru = sangoma_tdm_get_usr_mtu_mru(tech_pvt->socket, &tdm_api);
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ADJUSTED MTU AFTER SETTING IT TO %d is %d %d [%s]\n", new_mtu, mtu_mru, err, strerror(err));
                if (mtu_mru != globals.mtu) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Failure to adjust MTU\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failure to adjust MTU\n");
                        switch_channel_hangup(channel);
                        return SWITCH_STATUS_FALSE;
                }
@@ -259,7 +259,7 @@ static switch_status wanpipe_on_init(switch_core_session *session)
        if (switch_core_codec_init
                (&tech_pvt->read_codec, "L16", rate, 20, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
                 switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Cannot set read codec\n", switch_channel_get_name(channel));
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s Cannot set read codec\n", switch_channel_get_name(channel));
                switch_channel_hangup(channel);
                return SWITCH_STATUS_FALSE;
        }
@@ -267,7 +267,7 @@ static switch_status wanpipe_on_init(switch_core_session *session)
        if (switch_core_codec_init
                (&tech_pvt->write_codec, "L16", rate, 20, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
                 switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Cannot set read codec\n", switch_channel_get_name(channel));
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s Cannot set read codec\n", switch_channel_get_name(channel));
                switch_channel_hangup(channel);
                return SWITCH_STATUS_FALSE;
        }
@@ -537,13 +537,13 @@ static switch_status wanpipe_write_frame(switch_core_session *session, switch_fr
                result = sangoma_sendmsg_socket(tech_pvt->socket,
                                                                         &tech_pvt->hdrframe, sizeof(tech_pvt->hdrframe), dtmf, bread, 0);
                if (result < 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
                                                                  "Bad Write %d bytes returned %d (%s)!\n", bread,
                                                                  result, strerror(errno));
                        if (errno == EBUSY) {
                                continue;
                        }
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Failed!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Write Failed!\n");
                        status = SWITCH_STATUS_GENERR;
                        break;
                } else {
@@ -579,13 +579,13 @@ static switch_status wanpipe_write_frame(switch_core_session *session, switch_fr
                result = sangoma_sendmsg_socket(tech_pvt->socket,
                                                                         &tech_pvt->hdrframe, sizeof(tech_pvt->hdrframe), bp, towrite, 0);
                if (result < 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
                                                                  "Bad Write frame len %u write %d bytes returned %d (%s)!\n", frame->datalen,
                                                                  globals.mtu, result, strerror(errno));
                        if (errno == EBUSY) {
                                continue;
                        }
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Failed!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Write Failed!\n");
                        status = SWITCH_STATUS_GENERR;
                        break;
                } else {
@@ -616,7 +616,7 @@ static switch_status wanpipe_send_dtmf(switch_core_session *session, char *digit
        if (!tech_pvt->dtmf_buffer) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Allocate DTMF Buffer....");
                if (switch_buffer_create(switch_core_session_get_pool(session), &tech_pvt->dtmf_buffer, 3192) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "FAILURE!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Failed to allocate DTMF Buffer!\n");
                        return SWITCH_STATUS_FALSE;
                } else {
                        switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "SUCCESS!\n");
@@ -716,7 +716,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                }
                outbound_profile->destination_number++;
        } else if (!globals.configured_spans) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error No Spans Configured.\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error No Spans Configured.\n");
                return SWITCH_STATUS_FALSE;
        }
 
@@ -732,7 +732,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                        switch_core_session_set_private(*new_session, tech_pvt);
                        tech_pvt->session = *new_session;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -755,7 +755,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                                                if (num && *num > 47 && *num < 58) {
                                                        span = atoi(num);
                                                } else {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invlid Syntax\n");
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invlid Syntax\n");
                                                        switch_core_session_destroy(new_session);
                                                        return SWITCH_STATUS_GENERR;
                                                }
@@ -773,13 +773,13 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                                                } else if (num && *num > 47 && *num < 58) {
                                                        channo = atoi(num);
                                                } else {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invlid Syntax\n");
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invlid Syntax\n");
                             switch_core_session_destroy(new_session);
                             return SWITCH_STATUS_GENERR;
                                                }
                                                caller_profile->destination_number = p;
                                        } else {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invlid Syntax\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invlid Syntax\n");
                                                switch_core_session_destroy(new_session);
                                                return SWITCH_STATUS_GENERR;
                                        }
@@ -793,7 +793,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                                sangoma_span_chan_fromif(bchan, &span, &chan);
                                if (sangoma_span_chan_fromif(bchan, &span, &chan)) {
                                        if ((tech_pvt->socket = sangoma_open_tdmapi_span_chan(span, chan)) < 0) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't open fd!\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd!\n");
                                                switch_core_session_destroy(new_session);
                                                return SWITCH_STATUS_GENERR;
                                        }
@@ -802,7 +802,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                                        switch_channel_set_name(channel, name);                 
                                        switch_channel_set_caller_profile(channel, caller_profile);
                                } else {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid address\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid address\n");
                                        switch_core_session_destroy(new_session);
                                        return SWITCH_STATUS_GENERR;
                                }
@@ -831,7 +831,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                                                        }
 
                                                        if (channo <= 0 || channo == (SANGOMA_MAX_CHAN_PER_SPAN)) {
-                                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No Free Channels!\n");
+                                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No Free Channels!\n");
                                                                channo = 0;
                                                        }
                                                }
@@ -842,7 +842,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                                } while(autospan && span < MAX_SPANS && !spri && !channo);
 
                                if (!spri || channo == 0 || channo == (SANGOMA_MAX_CHAN_PER_SPAN)) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No Free Channels!\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No Free Channels!\n");
                                        switch_core_session_destroy(new_session);
                                        return SWITCH_STATUS_GENERR;
                                }
@@ -875,7 +875,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                                        }
 
                                        if ((tech_pvt->socket = sangoma_open_tdmapi_span_chan(spri->span, channo)) < 0) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't open fd!\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd!\n");
                                                switch_core_session_destroy(new_session);
                                                pri_sr_free(sr);
                                                return SWITCH_STATUS_GENERR;
@@ -886,7 +886,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                                }
                        }
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! no caller profile\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -905,7 +905,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
 static void s_pri_error(struct pri *pri, char *s)
 {
        if (globals.debug) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, s);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, s);
        }
 }
 
@@ -924,7 +924,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        pri_set_message(s_pri_message);
 
        if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                return SWITCH_STATUS_TERM;
        }
 
@@ -982,7 +982,7 @@ static int on_hangup(struct sangoma_pri *spri, sangoma_pri_event_t event_type, p
                chanmap->map[event->hangup.channel] = NULL;
        }
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Hanging up channel s%dc%d\n", spri->span, event->hangup.channel);
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Hanging up channel s%dc%d\n", spri->span, event->hangup.channel);
        return 0;
 }
 
@@ -996,12 +996,12 @@ static int on_answer(struct sangoma_pri *spri, sangoma_pri_event_t event_type, p
        chanmap = spri->private_info;
 
        if ((session = chanmap->map[event->answer.channel])) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Answer on channel s%dc%d\n", spri->span, event->answer.channel);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Answer on channel s%dc%d\n", spri->span, event->answer.channel);
                channel = switch_core_session_get_channel(session);
                assert(channel != NULL);
                switch_channel_answer(channel);
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Answer on channel s%dc%d but it's not in use?\n", spri->span, event->answer.channel);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Answer on channel s%dc%d but it's not in use?\n", spri->span, event->answer.channel);
        }
        
        return 0;
@@ -1019,14 +1019,14 @@ static int on_proceed(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
        if ((session = chanmap->map[event->proceeding.channel])) {
                switch_caller_profile *originator;
 
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Proceeding on channel s%dc%d\n", spri->span, event->proceeding.channel);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Proceeding on channel s%dc%d\n", spri->span, event->proceeding.channel);
                channel = switch_core_session_get_channel(session);
                assert(channel != NULL);
                
                if ((originator = switch_channel_get_originator_caller_profile(channel))) {
                        switch_core_session_message msg;
 
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Passing progress to Originator %s\n", originator->chan_name);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Passing progress to Originator %s\n", originator->chan_name);
 
                        msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
                        msg.from = switch_channel_get_name(channel);
@@ -1038,7 +1038,7 @@ static int on_proceed(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
 
                //switch_channel_answer(channel);
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Proceeding on channel s%dc%d but it's not in use?\n", spri->span, event->proceeding.channel);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Proceeding on channel s%dc%d but it's not in use?\n", spri->span, event->proceeding.channel);
        }
 
        return 0;
@@ -1087,12 +1087,12 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
 
        chanmap = spri->private_info;
        if (chanmap->map[event->ring.channel]) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "--Duplicate Ring on channel s%dc%d (ignored)\n",
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "--Duplicate Ring on channel s%dc%d (ignored)\n",
                                                          spri->span, event->ring.channel);
                return 0;
        }
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Ring on channel s%dc%d (from %s to %s)\n", spri->span, event->ring.channel,
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Ring on channel s%dc%d (from %s to %s)\n", spri->span, event->ring.channel,
                                                  event->ring.callingnum, event->ring.callednum);
 
 
@@ -1114,7 +1114,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
                        switch_channel_set_name(channel, name);
 
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(&session);
                        return 0;
                }
@@ -1146,7 +1146,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
                tech_pvt->span = spri->span;
 
                if ((fd = sangoma_open_tdmapi_span_chan(spri->span, event->ring.channel)) < 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't open fd!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd!\n");
                }
                //sangoma_tdm_set_hw_period(fd, &tdm_api, 480);
 
@@ -1156,7 +1156,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
                switch_channel_set_state(channel, CS_INIT);
                switch_core_session_thread_launch(session);
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Create new Inbound Channel!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create new Inbound Channel!\n");
        }
 
 
@@ -1176,7 +1176,7 @@ static int on_restart(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
        struct channel_map *chanmap;
 
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Restarting s%dc%d\n", spri->span, event->restart.channel);
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Restarting s%dc%d\n", spri->span, event->restart.channel);
 
        if (event->restart.channel < 1) {
                return 0;
@@ -1188,12 +1188,12 @@ static int on_restart(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
        if ((session = chanmap->map[event->restart.channel])) {
                switch_channel *channel;
                channel = switch_core_session_get_channel(session);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hanging Up channel %s\n", switch_channel_get_name(channel));
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Hanging Up channel %s\n", switch_channel_get_name(channel));
                switch_channel_hangup(channel);
        }
        
        if ((fd = sangoma_open_tdmapi_span_chan(spri->span, event->restart.channel)) < 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't open fd [%s]!\n", strerror(errno));
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd [%s]!\n", strerror(errno));
        } else {
                close(fd);
        }
@@ -1204,7 +1204,7 @@ static int on_dchan_up(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
 {
 
        if (!switch_test_flag(spri, SANGOMA_PRI_READY)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Span %d D-Chan UP!\n", spri->span);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Span %d D-Chan UP!\n", spri->span);
                switch_set_flag(spri, SANGOMA_PRI_READY);
        }
 
@@ -1215,7 +1215,7 @@ static int on_dchan_down(struct sangoma_pri *spri, sangoma_pri_event_t event_typ
 {
 
        if (switch_test_flag(spri, SANGOMA_PRI_READY)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Span %d D-Chan DOWN!\n", spri->span);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Span %d D-Chan DOWN!\n", spri->span);
                switch_clear_flag(spri, SANGOMA_PRI_READY);
        }
        
@@ -1288,7 +1288,7 @@ static switch_status config_wanpipe(int reload)
 
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
@@ -1309,13 +1309,13 @@ static switch_status config_wanpipe(int reload)
                        if (!strcmp(var, "span")) {
                                current_span = atoi(val);
                                if (current_span <= 0 || current_span > MAX_SPANS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid SPAN!\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid SPAN!\n");
                                        current_span = 0;
                                        continue;
                                }
                                if (!SPANS[current_span]) {
                                        if (!(SPANS[current_span] = switch_core_alloc(module_pool, sizeof(*SPANS[current_span])))) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "MEMORY ERROR\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "MEMORY ERROR\n");
                                                break;;
                                        }
                                        SPANS[current_span]->span = current_span;
@@ -1323,7 +1323,7 @@ static switch_status config_wanpipe(int reload)
                                
                        } else {
                                if (!current_span) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid option %s when no span defined.\n", var);
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid option %s when no span defined.\n", var);
                                        continue;
                                }
                                
@@ -1343,14 +1343,14 @@ static switch_status config_wanpipe(int reload)
                                                                SPANS[current_span]->bchans |= (1 << x);
                                                        }
                                                } else {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid bchan range!\n");
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid bchan range!\n");
                                                }
                                        } else {
                                                int i = atoi(val);
                                                if (i > 0 && i < 31) {
                                                        SPANS[current_span]->bchans |= (1 << i);
                                                } else {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid bchan!\n");
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid bchan!\n");
                                                }
                                        }
                                } else if (!strcmp(var, "node")) {
@@ -1369,7 +1369,7 @@ static switch_status config_wanpipe(int reload)
                                        if (mtu >= 10 && mtu < 960) {
                                                SPANS[current_span]->mtu = mtu;
                                        } else {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid MTU (%s)!\n", val);
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid MTU (%s)!\n", val);
                                        }
                                }
                        }
@@ -1395,10 +1395,10 @@ static switch_status config_wanpipe(int reload)
                                                                 SPANS[current_span]->pswitch,
                                                                 SPANS[current_span]->node,
                                                                 globals.debug)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot launch span %d\n", current_span);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot launch span %d\n", current_span);
                                continue;
                        }
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Launch span %d\n", current_span);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Launch span %d\n", current_span);
                        pri_thread_launch(&SPANS[current_span]->spri);
                        globals.configured_spans++;
                }
index c3f38cefd1e9404c2c06856db7347c3785405e48..383992602233b0785de3dff73c891d4a359d44ee 100644 (file)
@@ -212,7 +212,7 @@ static switch_status woomerachan_on_init(switch_core_session *session)
        if (switch_core_codec_init
                (&tech_pvt->read_codec, "L16", rate, 30, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
                 switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Cannot set read codec\n", switch_channel_get_name(channel));
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s Cannot set read codec\n", switch_channel_get_name(channel));
                switch_channel_hangup(channel);
                return SWITCH_STATUS_FALSE;
        }
@@ -220,7 +220,7 @@ static switch_status woomerachan_on_init(switch_core_session *session)
        if (switch_core_codec_init
                (&tech_pvt->write_codec, "L16", rate, 30, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
                 switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Cannot set read codec\n", switch_channel_get_name(channel));
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s Cannot set read codec\n", switch_channel_get_name(channel));
                switch_channel_hangup(channel);
                return SWITCH_STATUS_FALSE;
        }
@@ -483,7 +483,7 @@ static switch_status woomerachan_outgoing_channel(switch_core_session *session,
                        switch_core_session_set_private(*new_session, tech_pvt);
                        tech_pvt->session = *new_session;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -499,7 +499,7 @@ static switch_status woomerachan_outgoing_channel(switch_core_session *session,
                        switch_channel_set_caller_profile(channel, caller_profile);
                        tech_pvt->caller_profile = caller_profile;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! no caller profile\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
                        switch_core_session_destroy(new_session);
                        return SWITCH_STATUS_GENERR;
                }
@@ -527,7 +527,7 @@ static void tech_destroy(private_object * tech_pvt)
                                   WOOMERA_RECORD_SEPERATOR);
        if (woomera_message_parse
                (tech_pvt->command_channel, &wmsg, WOOMERA_HARD_TIMEOUT, tech_pvt->profile, &tech_pvt->event_queue) < 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "{%s} Already Disconnected\n", tech_pvt->profile->name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "{%s} Already Disconnected\n", tech_pvt->profile->name);
        }
 
        woomera_printf(tech_pvt->profile, tech_pvt->command_channel, "bye%s", WOOMERA_RECORD_SEPERATOR);
@@ -551,7 +551,7 @@ static void woomera_printf(woomera_profile * profile, switch_socket_t *socket, c
 #endif
        va_end(ap);
        if (res == -1) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Out of memory\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Out of memory\n");
        } else {
                if (profile && globals.debug) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send Message: {%s} [%s/%d]\n%s\n%s", profile->name,
@@ -596,7 +596,7 @@ static int woomera_enqueue_event(woomera_event_queue * event_queue, woomera_mess
                }
                return 1;
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Memory Allocation Error!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Allocation Error!\n");
        }
 
        return 0;
@@ -704,14 +704,14 @@ static int woomera_message_parse(switch_socket_t *fd, woomera_message * wmsg, in
                                        cur++;
                                        wmsg->mval = atoi(buf);
                                } else {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Malformed Message!\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Malformed Message!\n");
                                        break;
                                }
                        }
                        if (cur) {
                                strncpy(wmsg->command, cur, WOOMERA_STRLEN);
                        } else {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Malformed Message!\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Malformed Message!\n");
                                break;
                        }
                } else {
@@ -820,7 +820,7 @@ static int woomera_locate_socket(woomera_profile * profile, switch_socket_t **wo
                        if (!woomera_profile_thread_running(profile, 0, 0)) {
                                break;
                        }
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "{%s} Cannot Reconnect to Woomera! retry in 5 seconds\n",
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "{%s} Cannot Reconnect to Woomera! retry in 5 seconds\n",
                                                                  profile->name);
                        switch_sleep(WOOMERA_RECONNECT_TIME);
                }
@@ -830,7 +830,7 @@ static int woomera_locate_socket(woomera_profile * profile, switch_socket_t **wo
                                woomera_printf(profile, *woomera_socket, "LISTEN%s", WOOMERA_RECORD_SEPERATOR);
                                if (woomera_message_parse(*woomera_socket,
                                                                                  &wmsg, WOOMERA_HARD_TIMEOUT, profile, &profile->event_queue) < 0) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "{%s} HELP! Woomera is broken!\n", profile->name);
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ALERT, "{%s} HELP! Woomera is broken!\n", profile->name);
                                        globals.panic = 1;
                                        woomera_profile_thread_running(&default_profile, 1, 0);
                                        switch_sleep(WOOMERA_RECONNECT_TIME);
@@ -881,7 +881,7 @@ static int tech_activate(private_object * tech_pvt)
                if ((connect_woomera(&tech_pvt->command_channel, tech_pvt->profile, 0))) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "connected to woomera!\n");
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't connect to woomera!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't connect to woomera!\n");
                        switch_sleep(WOOMERA_RECONNECT_TIME);
                        return -1;
                }
@@ -906,14 +906,14 @@ static int tech_activate(private_object * tech_pvt)
                        woomera_printf(tech_pvt->profile, tech_pvt->command_channel, "LISTEN%s", WOOMERA_RECORD_SEPERATOR);
                        if (woomera_message_parse(tech_pvt->command_channel,
                                                                          &wmsg, WOOMERA_HARD_TIMEOUT, tech_pvt->profile, &tech_pvt->event_queue) < 0) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "{%s} HELP! Woomera is broken!\n",
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ALERT, "{%s} HELP! Woomera is broken!\n",
                                                                          tech_pvt->profile->name);
                                switch_set_flag(tech_pvt, TFLAG_ABORT);
                                globals.panic = 1;
                        }
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Where's my tech_pvt?\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Where's my tech_pvt?\n");
        }
 
        return 0;
@@ -968,7 +968,7 @@ static void *woomera_channel_thread_run(switch_thread *thread, void *obj)
                        if (woomera_message_parse
                                (tech_pvt->command_channel, &wmsg, WOOMERA_HARD_TIMEOUT, tech_pvt->profile,
                                 &tech_pvt->event_queue) < 0) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "{%s} HELP! Woomera is broken!\n",
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ALERT, "{%s} HELP! Woomera is broken!\n",
                                                                          tech_pvt->profile->name);
                                switch_set_flag(tech_pvt, TFLAG_ABORT);
                                globals.panic = 1;
@@ -984,7 +984,7 @@ static void *woomera_channel_thread_run(switch_thread *thread, void *obj)
                        if (woomera_message_parse
                                (tech_pvt->command_channel, &wmsg, WOOMERA_HARD_TIMEOUT, tech_pvt->profile,
                                 &tech_pvt->event_queue) < 0) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "{%s} HELP! Woomera is broken!\n",
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ALERT, "{%s} HELP! Woomera is broken!\n",
                                                                          tech_pvt->profile->name);
                                switch_set_flag(tech_pvt, TFLAG_ABORT);
                                globals.panic = 1;
@@ -1082,7 +1082,7 @@ static void *woomera_channel_thread_run(switch_thread *thread, void *obj)
 
                                if (woomera_message_parse(tech_pvt->command_channel,
                                                                                  &wmsg, WOOMERA_HARD_TIMEOUT, tech_pvt->profile, &tech_pvt->event_queue) < 0) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "{%s} HELP! Woomera is broken!\n",
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ALERT, "{%s} HELP! Woomera is broken!\n",
                                                                                  tech_pvt->profile->name);
                                        switch_set_flag(tech_pvt, TFLAG_ABORT);
                                        globals.panic = 1;
@@ -1117,7 +1117,7 @@ static void *woomera_channel_thread_run(switch_thread *thread, void *obj)
                                                                                                 switch_core_session_get_pool(tech_pvt->session)) !=
                                                SWITCH_STATUS_SUCCESS) {
                                                if (globals.debug) {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
                                                                                                  WOOMERA_DEBUG_PREFIX "{%s} Cannot resolve %s\n",
                                                                                                  tech_pvt->profile->name, ip);
                                                }
@@ -1159,7 +1159,7 @@ static void *woomera_thread_run(void *obj)
        while (woomera_profile_thread_running(profile, 0, 0)) {
                /* listen on socket and handle events */
                if (globals.panic == 2) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Woomera is disabled!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Woomera is disabled!\n");
                        switch_sleep(WOOMERA_RECONNECT_TIME);
                        continue;
                }
@@ -1178,7 +1178,7 @@ static void *woomera_thread_run(void *obj)
 
                if (globals.panic) {
                        if (globals.panic != 2) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Help I'm in a state of panic!\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ALERT, "Help I'm in a state of panic!\n");
                                globals.panic = 0;      //fix
                        }
                        woomera_socket_close(&profile->woomera_socket);
@@ -1192,7 +1192,7 @@ static void *woomera_thread_run(void *obj)
                                                                                  /* if we are not stingy with threads we can block forever */
                                                                                  0, profile, NULL))) != 0)) {
                        if (res < 0) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "{%s} HELP! I lost my connection to woomera!\n",
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ALERT, "{%s} HELP! I lost my connection to woomera!\n",
                                                                          profile->name);
                                woomera_socket_close(&profile->woomera_socket);
 
@@ -1228,7 +1228,7 @@ static void *woomera_thread_run(void *obj)
                                        name = woomera_message_header(&wmsg, "Channel-Name");
                                }
 
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "New Inbound Channel %s!\n", name);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "New Inbound Channel %s!\n", name);
                                if ((session = switch_core_session_request(&woomerachan_endpoint_interface, NULL)) != 0) {
                                        struct private_object *tech_pvt;
                                        switch_channel *channel;
@@ -1243,7 +1243,7 @@ static void *woomera_thread_run(void *obj)
                                                switch_core_session_set_private(session, tech_pvt);
                                                tech_pvt->session = session;
                                        } else {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
                                                switch_core_session_destroy(&session);
                                                break;
                                        }
@@ -1305,7 +1305,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        globals.next_woomera_port = WOOMERA_MIN_PORT;
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
@@ -1362,7 +1362,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
 
 
        if (switch_mutex_init(&default_profile.iolock, SWITCH_MUTEX_NESTED, module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no lock\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "OH OH no lock\n");
                return SWITCH_STATUS_TERM;
        }
 
index 13d0d1a39dc69041b22f7de1045aa0dceaafa532..aa3aafead9b02e4a2ec362b51f3dfecef6ec0ef8 100644 (file)
@@ -56,12 +56,12 @@ static switch_status load_config(void)
        char *cf = "event_multicast.conf";
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
        if (switch_event_reserve_subclass(MULTICAST_EVENT) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't register subclass!");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass!");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -120,39 +120,39 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        memset(&globals, 0, sizeof(globals));
        
        if (load_config() != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Configure\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Configure\n");
                return SWITCH_STATUS_TERM;
        }
 
        if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                return SWITCH_STATUS_TERM;
        }
 
        if (switch_sockaddr_info_get(&globals.addr, globals.address, SWITCH_UNSPEC, globals.port, 0, module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot find address\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find address\n");
                return SWITCH_STATUS_TERM;
        }
 
        if (switch_socket_create(&globals.udp_socket, AF_INET, SOCK_DGRAM, 0, module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Socket Error\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error\n");
                return SWITCH_STATUS_TERM;
        }
        
        if (switch_socket_opt_set(globals.udp_socket, SWITCH_SO_REUSEADDR, 1) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Socket Option Error\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Option Error\n");
                switch_socket_close(globals.udp_socket);
                return SWITCH_STATUS_TERM;
        }
 
        if (switch_mcast_join(globals.udp_socket, globals.addr, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Multicast Error\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Multicast Error\n");
                switch_socket_close(globals.udp_socket);
         return SWITCH_STATUS_TERM;
        }
 
        if (switch_socket_bind(globals.udp_socket, globals.addr) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Bind Error\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Bind Error\n");
                switch_socket_close(globals.udp_socket);
                return SWITCH_STATUS_TERM;
        }
@@ -163,7 +163,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
 
        if (switch_event_bind((char *) modname, SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) !=
                SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't bind!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
                switch_socket_close(globals.udp_socket);
                return SWITCH_STATUS_GENERR;
        }
index 1db68d273ad451dff8391b2c8536e5272f14be57..afc7bcf4c722322e4a71cf5f357b494e154f224a 100644 (file)
@@ -111,13 +111,13 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        *interface = &event_test_module_interface;
 
        if (switch_event_reserve_subclass(MY_EVENT_COOL) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't register subclass!");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass!");
                return SWITCH_STATUS_GENERR;
        }
 
        if (switch_event_bind((char *) modname, SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) !=
                SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't bind!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
                return SWITCH_STATUS_GENERR;
        }
 
index 5558d0e77a13c37d6d72b6237247796c93274512..a3b9542281a9ccd0e3f9bdfb729f611b53bdda5e 100644 (file)
@@ -71,7 +71,7 @@ static void event_handler(switch_event *event)
        while (!globals.session.authorized) {
                switch_yield(100000);
                if (loops++ > 5) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Nothing to do with this Event!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Nothing to do with this Event!\n");
                        return;
                }
        }
@@ -106,7 +106,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_jid, globals.jid)
        memset(&globals, 0, sizeof(globals));
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
@@ -133,7 +133,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_jid, globals.jid)
                /* TBD use config to pick what events to bind to */
                if (switch_event_bind((char *) modname, SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) !=
                        SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't bind!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
                        return SWITCH_STATUS_GENERR;
                }
 
@@ -185,9 +185,9 @@ static int on_stream(struct session *sess, int type, iks * node)
                                        iks_start_sasl(sess->parser, IKS_SASL_PLAIN, sess->acc->user, sess->pass);
                        }
                } else if (strcmp("failure", iks_name(node)) == 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "sasl authentication failed\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "sasl authentication failed\n");
                } else if (strcmp("success", iks_name(node)) == 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "server connected\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "server connected\n");
                        sess->authorized = 1;
                        iks_send_header(sess->parser, sess->acc->server);
                } else {
@@ -240,7 +240,7 @@ static int on_msg(void *user_data, ikspak * pak)
 
 static int on_error(void *user_data, ikspak * pak)
 {
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "authorization failed\n");
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "authorization failed\n");
        return IKS_FILTER_EAT;
 }
 
@@ -296,11 +296,11 @@ static void xmpp_connect(char *jabber_id, char *pass)
                case IKS_OK:
                        break;
                case IKS_NET_NODNS:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "hostname lookup failed\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hostname lookup failed\n");
                case IKS_NET_NOCONN:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "connection failed\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "connection failed\n");
                default:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "io error %d\n", e);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "io error %d\n", e);
                        switch_sleep(5000000);
                        continue;
                }
@@ -318,20 +318,20 @@ static void xmpp_connect(char *jabber_id, char *pass)
                        }
 
                        if (IKS_OK != e) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "io error %d\n", e);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "io error %d\n", e);
                                switch_sleep(5000000);
                                break;
                        }
 
                        if (!globals.session.authorized) {
                                if (IKS_NET_TLSFAIL == e) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "tls handshake failed\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "tls handshake failed\n");
                                        switch_sleep(5000000);
                                        break;
                                }
 
                                if (globals.session.counter == 0) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "network timeout\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "network timeout\n");
                                        switch_sleep(5000000);
                                        break;
                                }
index 3a67c0652d7f8a768a5da7367638e24cd0467387..134307d20a8d067ed4aa8baceb316dbfe1ff80ee 100644 (file)
@@ -129,7 +129,7 @@ static void event_handler(switch_event *event)
        switch (event->event_id) {
        case SWITCH_EVENT_PUBLISH:
                if (sw_text_record_init(&text_record) != SW_OKAY) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "sw_text_record_init() failed\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "sw_text_record_init() failed\n");
                        return;
                } else {
                        switch_event_header *hp;
@@ -146,7 +146,7 @@ static void event_handler(switch_event *event)
 
                                snprintf(data, len, "%s=%s", hp->name, hp->value);
                                if (sw_text_record_add_string(text_record, data) != SW_OKAY) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "unable to add service text: %s\n", data);
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to add service text: %s\n", data);
                                        free(data);
                                        return;
                                }
@@ -172,7 +172,7 @@ static void event_handler(switch_event *event)
                                                                                           my_service_reply,
                                                                                           NULL,
                                                                                           &globals.disc_id)) != SW_OKAY) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "publish failed: %u\n", result);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "publish failed: %u\n", result);
                                sw_text_record_fina(text_record);
                                switch_mutex_unlock(globals.zc_lock);
                                return;
@@ -201,7 +201,7 @@ static switch_status load_config(void)
        sw_discovery_oid *oid;
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
@@ -220,13 +220,13 @@ static switch_status load_config(void)
                        } else if (!strcasecmp(var, "publish") && !strcasecmp(val, "yes")) {
                                if (switch_event_bind((char *) modname, SWITCH_EVENT_PUBLISH, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) !=
                                        SWITCH_STATUS_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't bind!\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
                                        return SWITCH_STATUS_GENERR;
                                }
                                
                                if (switch_event_bind((char *) modname, SWITCH_EVENT_UNPUBLISH, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) !=
                                        SWITCH_STATUS_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't bind!\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
                                        return SWITCH_STATUS_GENERR;
                                }
                        }
@@ -270,14 +270,14 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        memset(&globals, 0, sizeof(globals));
 
        if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                return SWITCH_STATUS_TERM;
        }
 
        switch_mutex_init(&globals.zc_lock, SWITCH_MUTEX_NESTED, module_pool);
 
        if (sw_discovery_init(&globals.discovery) != SW_OKAY) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "sw_discovery_init() failed\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "sw_discovery_init() failed\n");
                return SWITCH_STATUS_TERM;
        }
 
@@ -286,12 +286,12 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        }
        
        if (switch_event_reserve_subclass(MY_EVENT_PUBLISH) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't register subclass!");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass!");
                return SWITCH_STATUS_GENERR;
        }
 
        if (switch_event_reserve_subclass(MY_EVENT_UNPUBLISH) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't register subclass!");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass!");
                return SWITCH_STATUS_GENERR;
        }
 
index a8dc291c63c2184e2b390bf222259d62525ffa9a..4e2009ab5d41530c8cee5ac55b7989e5e011d1b8 100644 (file)
@@ -49,7 +49,7 @@ static switch_status sndfile_file_open(switch_file_handle *handle, char *path)
        int ready = 1;
        
        if ((ext = strrchr(path, '.')) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid Format\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Format\n");
                return SWITCH_STATUS_GENERR;
        }
        ext++;
@@ -64,7 +64,7 @@ static switch_status sndfile_file_open(switch_file_handle *handle, char *path)
        }
 
        if (!mode) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid Mode!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Mode!\n");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -120,18 +120,18 @@ static switch_status sndfile_file_open(switch_file_handle *handle, char *path)
 
 
        if ((mode & SFM_WRITE) && sf_format_check (&context->sfinfo) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error : file format is invalid (0x%08X).\n", context->sfinfo.format);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error : file format is invalid (0x%08X).\n", context->sfinfo.format);
                return SWITCH_STATUS_GENERR;
        };
 
 
        if ((context->handle = sf_open(path, mode, &context->sfinfo)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error Opening File [%s] [%s]\n", path,
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening File [%s] [%s]\n", path,
                                                          sf_strerror(context->handle));
                return SWITCH_STATUS_GENERR;
        }
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Opening File [%s] %dhz\n", path, context->sfinfo.samplerate);
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Opening File [%s] %dhz\n", path, context->sfinfo.samplerate);
        handle->samples = (unsigned int) context->sfinfo.frames;
        handle->samplerate = context->sfinfo.samplerate;
        handle->channels = (uint8_t)context->sfinfo.channels;
@@ -158,7 +158,7 @@ static switch_status sndfile_file_seek(switch_file_handle *handle, unsigned int
        sndfile_context *context = handle->private_info;
 
        if (!handle->seekable) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "File is not seekable\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "File is not seekable\n");
                return SWITCH_STATUS_NOTIMPL;
        }
 
@@ -252,13 +252,13 @@ static switch_status setup_formats(void)
        
        sf_command(NULL, SFC_GET_LIB_VERSION, buffer, sizeof(buffer));
        if (strlen(buffer) < 1) {
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Line %d: could not retrieve lib version.\n", __LINE__);
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Line %d: could not retrieve lib version.\n", __LINE__);
                return SWITCH_STATUS_FALSE;
        }
 
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\nLibSndFile Version : %s Supported Formats\n", buffer);
-       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG,
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "\nLibSndFile Version : %s Supported Formats\n", buffer);
+       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
                                                  "================================================================================\n");
        sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT, &major_count, sizeof(int));
        sf_command(NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &subtype_count, sizeof(int));
@@ -272,7 +272,7 @@ static switch_status setup_formats(void)
                skip = 0;
                info.format = m;
                sf_command(NULL, SFC_GET_FORMAT_MAJOR, &info, sizeof(info));
-               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "%s  (extension \"%s\")\n", info.name, info.extension);
+               switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "%s  (extension \"%s\")\n", info.name, info.extension);
                for (x = 0; x < len; x++) {
                        if (supported_formats[x] == info.extension) {
                                skip++;
@@ -303,7 +303,7 @@ static switch_status setup_formats(void)
 
 
 
-       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG,
+       switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_NOTICE,
                                                  "================================================================================\n");
        
        return SWITCH_STATUS_SUCCESS;
index 90a0b436f656dfa91d7164bb05fe486b396f8d12..8d935c6b58c26705c16ff403741cddee5ea21139 100644 (file)
@@ -105,7 +105,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
                perl_destruct(globals.my_perl);
                perl_free(globals.my_perl);
                globals.my_perl = NULL;
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unallocated perl interpreter.\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Unallocated perl interpreter.\n");
        }
        return SWITCH_STATUS_SUCCESS;
 }
@@ -117,11 +117,11 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        char code[1024];
        
        if (!(my_perl = perl_alloc())) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not allocate perl intrepreter\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not allocate perl intrepreter\n");
                switch_core_destroy();
                return SWITCH_STATUS_MEMERR;
        }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Allocated perl intrepreter.\n");
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Allocated perl intrepreter.\n");
 
        PERL_SET_CONTEXT(my_perl);
        perl_construct(my_perl);
index 0e49069ed1d49b8c2162ba594c01347560acad6c..5214f8c3a38074cb6296a5fa144b1111a3d2e939 100644 (file)
@@ -152,7 +152,7 @@ struct db_obj {
 static void js_error(JSContext *cx, const char *message, JSErrorReport *report)
 {
        if (message) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s\n", message);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s\n", message);
        }
        
 }
@@ -765,7 +765,7 @@ static JSBool js_fetchurl_hash(JSContext *cx, JSObject *obj, uintN argc, jsval *
                curl_easy_perform(curl_handle);
                curl_easy_cleanup(curl_handle);
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error!\n");
                return JS_FALSE;
        }
 
@@ -803,10 +803,10 @@ static JSBool js_fetchurl_file(JSContext *cx, JSObject *obj, uintN argc, jsval *
                        curl_easy_cleanup(curl_handle);
                        close(config_data.fd);
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error!\n");
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error!\n");
        }
 
        return JS_TRUE;
@@ -1012,7 +1012,7 @@ static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
                }
                
                if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                        return JS_FALSE;
                }
 
@@ -1028,10 +1028,10 @@ static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
                        switch_set_flag(jss, S_HUP);
                        return JS_TRUE;
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Create Channel\n");                     
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Channel\n");                     
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Missing Args\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Missing Args\n");
        }
 
        return JS_TRUE;
@@ -1091,7 +1091,7 @@ static JSBool fileio_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *
                }
                switch_core_new_memory_pool(&pool);
                if (switch_file_open(&fd, path, flags, SWITCH_FPROT_UREAD|SWITCH_FPROT_UWRITE, pool) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Open File!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Open File!\n");
                        switch_core_destroy_memory_pool(&pool);
                        return JS_FALSE;
                }
@@ -1240,7 +1240,7 @@ static JSBool db_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv
                char *dbname = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
                switch_core_new_memory_pool(&pool);
                if (! (db = switch_core_db_open_file(dbname))) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Open DB!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Open DB!\n");
                        switch_core_destroy_memory_pool(&pool);
                        return JS_FALSE;
                }
@@ -1318,7 +1318,7 @@ static JSBool db_exec(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv
 
                switch_core_db_exec(dbo->db, sql, cb_func, arg, &err);
                if (err) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error %s\n", err);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error %s\n", err);
                        switch_core_db_free(err);
                        *rval = BOOLEAN_TO_JSVAL( JS_FALSE );
                }
@@ -1396,7 +1396,7 @@ static JSBool db_prepare(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
                char *sql = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
 
                if(switch_core_db_prepare(dbo->db, sql, 0, &dbo->stmt, 0)) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error %s\n", switch_core_db_errmsg(dbo->db));
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error %s\n", switch_core_db_errmsg(dbo->db));
                } else {
                        *rval = BOOLEAN_TO_JSVAL( JS_TRUE );
                }
@@ -1469,15 +1469,15 @@ static JSBool teletone_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
        if (argc > 0) {
                if (JS_ValueToObject(cx, argv[0], &session_obj)) {
                        if (!(jss = JS_GetPrivate(cx, session_obj))) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Find Session [1]\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Find Session [1]\n");
                                return JS_FALSE;
                        }
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Find Session [2]\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Find Session [2]\n");
                        return JS_FALSE;
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Missing Session Arg\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing Session Arg\n");
                return JS_FALSE;
        }
        if (argc > 1) {
@@ -1486,14 +1486,14 @@ static JSBool teletone_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
 
        if (argc > 2) {
                if (!JS_ValueToInt32(cx, argv[2], &memory)) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Convert to INT\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Convert to INT\n");
                        return JS_FALSE;
                }
        } 
        switch_core_new_memory_pool(&pool);
 
        if (!(tto = switch_core_alloc(pool, sizeof(*tto)))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Memory Error\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error\n");
                return JS_FALSE;
        }
 
@@ -1602,7 +1602,7 @@ static JSBool teletone_generate(JSContext *cx, JSObject *obj, uintN argc, jsval
 
                if (argc > 1) {
                        if (!JS_ValueToInt32(cx, argv[1], &loops)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Convert to INT\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Convert to INT\n");
                                return JS_FALSE;
                        }
                        loops--;
@@ -1686,7 +1686,7 @@ static JSBool teletone_generate(JSContext *cx, JSObject *obj, uintN argc, jsval
                        write_frame.samples = write_frame.datalen / 2;
                        for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
                                if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Bad Write\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Bad Write\n");
                                        break;
                                }
                        }
@@ -1758,7 +1758,7 @@ static JSBool js_include(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
                eval_some_js(code, cx, obj, rval);
                return JS_TRUE;
        }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid Arguements\n");
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Arguements\n");
        return JS_FALSE;
 }
 
@@ -1801,13 +1801,13 @@ static JSBool js_bridge(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j
        if (argc > 1) {
                if (JS_ValueToObject(cx, argv[0], &session_obj_a)) {
                        if (!(jss_a = JS_GetPrivate(cx, session_obj_a))) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Find Session [1]\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Find Session [1]\n");
                                return JS_FALSE;
                        }
                } 
                if (JS_ValueToObject(cx, argv[1], &session_obj_b)) {
                        if (!(jss_b = JS_GetPrivate(cx, session_obj_b))) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Find Session [1]\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Find Session [1]\n");
                                return JS_FALSE;
                        }
                } 
@@ -1815,12 +1815,12 @@ static JSBool js_bridge(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j
        
        if (argc > 3) {
                if (!JS_ValueToInt32(cx, argv[3], &timelimit)) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Cannot Convert to INT\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Convert to INT\n");
                        return JS_FALSE;
                }
        }
        if (!(jss_a && jss_b)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Failure! %s %s\n", jss_a ? "y" : "n", jss_b ? "y" : "n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failure! %s %s\n", jss_a ? "y" : "n", jss_b ? "y" : "n");
                return JS_FALSE;
        }
 
@@ -1938,9 +1938,9 @@ static JSBool js_email(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, js
 
 
                if (file) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Emailed file [%s] to [%s]\n", filename, to);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Emailed file [%s] to [%s]\n", filename, to);
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Emailed data to [%s]\n", to);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Emailed data to [%s]\n", to);
                }
                return JS_TRUE;
        }
@@ -2072,7 +2072,7 @@ static void js_parse_and_execute(switch_core_session *session, char *input_code)
                        JS_SetPrivate(cx, javascript_global_object, session);
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Allocation Error!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Allocation Error!\n");
                return;
        }
 
@@ -2128,7 +2128,7 @@ static void js_thread_launch(char *text)
 
        if (!module_pool) {
                if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                        return;
                }
        }
index 125468d073266eb34350005e3e9d284c9caa100c..ee9a3fe08bdb9a05590d4332db4ccbc5533e4a4c 100644 (file)
@@ -85,7 +85,7 @@ static switch_status config_logger(void)
        char *cf = "console.conf";
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_FALSE;
        }
 
@@ -134,7 +134,7 @@ static switch_status switch_console_logger(const switch_log_node *node, switch_l
 SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
 {
        if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
                return SWITCH_STATUS_TERM;
        }
 
index d3f14ce3c7d52bd782ffa542ce6609645b036668..dc6f8575c123bbab113d623d5ee103a0cf86479f 100644 (file)
@@ -130,7 +130,7 @@ static switch_status load_config(void)
        char *cf = "syslog.conf";
 
        if (!switch_config_open_file(&cfg, cf)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return SWITCH_STATUS_TERM;
        }
 
index 953d86ce41cede56c4ec6b82784c90600d1d4719..1d179a807828cdcd4641d29787b9f73cd9390528 100644 (file)
@@ -402,7 +402,7 @@ SWITCH_DECLARE(switch_channel_state) switch_channel_set_state(switch_channel *ch
                        switch_core_session_signal_state_change(channel->session);
                }
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Invalid State Change %s -> %s\n", channel->name,
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s Invalid State Change %s -> %s\n", channel->name,
                                                          state_names[last_state], state_names[state]);
 
                //we won't tolerate an invalid state change so we can make sure we are as robust as a nice cup of dark coffee!
@@ -601,7 +601,7 @@ SWITCH_DECLARE(switch_status) switch_channel_pre_answer(switch_channel *channel)
        status = switch_core_session_message_send(uuid, &msg);
 
        if (status == SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Pre-Answer %s!\n", channel->name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Pre-Answer %s!\n", channel->name);
                switch_channel_set_flag(channel, CF_EARLY_MEDIA);
        }
 
@@ -621,7 +621,7 @@ SWITCH_DECLARE(switch_status) switch_channel_answer(switch_channel *channel)
 
                channel->times.answered = switch_time_now();
                switch_channel_set_flag(channel, CF_ANSWERED);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Answer %s!\n", channel->name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Answer %s!\n", channel->name);
                if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_ANSWER) == SWITCH_STATUS_SUCCESS) {
                        switch_channel_event_set_data(channel, event);
                        switch_event_fire(&event);
index 2afcc2d0d7a223bb93d667c26c2d061d43baedf7..9ffb44b2b773d27c0f5d8d2f7be0df0f43631519 100644 (file)
@@ -120,7 +120,7 @@ SWITCH_DECLARE(switch_core_db *) switch_core_db_open_file(char *filename)
 
        db_pick_path(filename, path, sizeof(path));
        if (switch_core_db_open(path, &db)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SQL ERR [%s]\n", switch_core_db_errmsg(db));
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL ERR [%s]\n", switch_core_db_errmsg(db));
                switch_core_db_close(db);
                db = NULL;
        }
@@ -297,7 +297,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec *codec, char *
        memset(codec, 0, sizeof(*codec));
 
        if ((codec_interface = switch_loadable_module_get_codec_interface(codec_name)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "invalid codec %s!\n", codec_name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid codec %s!\n", codec_name);
                return SWITCH_STATUS_GENERR;
        }
 
@@ -328,7 +328,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec *codec, char *
 
                return SWITCH_STATUS_SUCCESS;
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec %s Exists but not then desired implementation.\n",
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Codec %s Exists but not then desired implementation.\n",
                                                          codec_name);
        }
 
@@ -349,12 +349,12 @@ SWITCH_DECLARE(switch_status) switch_core_codec_encode(switch_codec *codec,
        assert(decoded_data != NULL);
 
        if (!codec->implementation) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec is not initilized!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec is not initilized!\n");
                return SWITCH_STATUS_GENERR;
        }
 
        if (!switch_test_flag(codec, SWITCH_CODEC_FLAG_ENCODE)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec's encoder is not initilized!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec's encoder is not initilized!\n");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -383,12 +383,12 @@ SWITCH_DECLARE(switch_status) switch_core_codec_decode(switch_codec *codec,
 
 
        if (!codec->implementation) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec is not initilized!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec is not initilized!\n");
                return SWITCH_STATUS_GENERR;
        }
 
        if (!switch_test_flag(codec, SWITCH_CODEC_FLAG_DECODE)) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec's decoder is not initilized!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec's decoder is not initilized!\n");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -406,7 +406,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec *codec)
        assert(codec != NULL);
 
        if (!codec->implementation) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec is not initilized!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec is not initilized!\n");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -426,13 +426,13 @@ SWITCH_DECLARE(switch_status) switch_core_file_open(switch_file_handle *fh, char
        switch_status status;
 
        if ((ext = strrchr(file_path, '.')) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid Format\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Format\n");
                return SWITCH_STATUS_FALSE;
        }
        ext++;
 
        if ((fh->file_interface = switch_loadable_module_get_file_interface(ext)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "invalid file format [%s]!\n", ext);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid file format [%s]!\n", ext);
                return SWITCH_STATUS_GENERR;
        }
 
@@ -484,7 +484,7 @@ SWITCH_DECLARE(switch_status) switch_core_directory_open(switch_directory_handle
        switch_status status;
 
        if ((dh->directory_interface = switch_loadable_module_get_directory_interface(module_name)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "invalid directory module [%s]!\n", module_name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid directory module [%s]!\n", module_name);
                return SWITCH_STATUS_GENERR;
        }
 
@@ -530,7 +530,7 @@ SWITCH_DECLARE(switch_status) switch_core_speech_open(switch_speech_handle *sh,
        switch_status status;
 
        if ((sh->speech_interface = switch_loadable_module_get_speech_interface(module_name)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "invalid speech module [%s]!\n", module_name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid speech module [%s]!\n", module_name);
                return SWITCH_STATUS_GENERR;
        }
 
@@ -592,7 +592,7 @@ SWITCH_DECLARE(switch_status) switch_core_timer_init(switch_timer *timer, char *
        switch_status status;
        memset(timer, 0, sizeof(*timer));
        if ((timer_interface = switch_loadable_module_get_timer_interface(timer_name)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "invalid timer %s!\n", timer_name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid timer %s!\n", timer_name);
                return SWITCH_STATUS_GENERR;
        }
 
@@ -618,7 +618,7 @@ SWITCH_DECLARE(switch_status) switch_core_timer_init(switch_timer *timer, char *
 SWITCH_DECLARE(int) switch_core_timer_next(switch_timer *timer)
 {
        if (!timer->timer_interface) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Timer is not initilized!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Timer is not initilized!\n");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -634,7 +634,7 @@ SWITCH_DECLARE(int) switch_core_timer_next(switch_timer *timer)
 SWITCH_DECLARE(switch_status) switch_core_timer_destroy(switch_timer *timer)
 {
        if (!timer->timer_interface) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Timer is not initilized!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Timer is not initilized!\n");
                return SWITCH_STATUS_GENERR;
        }
 
@@ -852,7 +852,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_outgoing_channel(switch_core_s
        const switch_endpoint_interface *endpoint_interface;
 
        if ((endpoint_interface = switch_loadable_module_get_endpoint_interface(endpoint_name)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not locate channel type %s\n", endpoint_name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not locate channel type %s\n", endpoint_name);
                return SWITCH_STATUS_FALSE;
        }
 
@@ -1052,7 +1052,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_read_frame(switch_core_session
                                status = SWITCH_STATUS_SUCCESS;
                                break;
                        default:
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec %s decoder error!\n",
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s decoder error!\n",
 
                                                                          session->read_codec->codec_interface->interface_name);
                                return status;
@@ -1124,7 +1124,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_read_frame(switch_core_session
                                        status = SWITCH_STATUS_SUCCESS;
                                        break;
                                default:
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec %s encoder error!\n",
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n",
                                                                                  session->read_codec->codec_interface->interface_name);
                                        *frame = NULL;
                                        status = SWITCH_STATUS_GENERR;
@@ -1226,7 +1226,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_sessio
                                status = SWITCH_STATUS_SUCCESS;
                                break;
                        default:
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec %s decoder error!\n",
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s decoder error!\n",
                                                                          frame->codec->codec_interface->interface_name);
                                return status;
                        }
@@ -1260,12 +1260,12 @@ SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_sessio
                                        if ((status =
                                                 switch_buffer_create(session->pool, &session->raw_write_buffer,
                                                                                          bytes)) != SWITCH_STATUS_SUCCESS) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Buffer Failed!\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Write Buffer Failed!\n");
                                                return status;
                                        }
                                }
                                if (!(switch_buffer_write(session->raw_write_buffer, write_frame->data, write_frame->datalen))) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Buffer Failed!\n");
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Write Buffer Failed!\n");
                                        return SWITCH_STATUS_MEMERR;
                                }
                        }
@@ -1295,7 +1295,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_sessio
                                        status = SWITCH_STATUS_SUCCESS;
                                        break;
                                default:
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec %s encoder error!\n",
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n",
                                                                                  session->read_codec->codec_interface->interface_name);
                                        write_frame = NULL;
                                        return status;
@@ -1351,7 +1351,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_sessio
                                                                status = SWITCH_STATUS_SUCCESS;
                                                                break;
                                                        default:
-                                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec %s encoder error!\n",
+                                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n",
                                                                                                          session->read_codec->codec_interface->interface_name);
                                                                write_frame = NULL;
                                                                return status;
@@ -1697,7 +1697,7 @@ static void switch_core_standard_on_ring(switch_core_session *session)
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Standard RING %s\n", switch_channel_get_name(session->channel));
 
        if ((caller_profile = switch_channel_get_caller_profile(session->channel)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't get profile!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't get profile!\n");
                switch_channel_set_state(session->channel, CS_HANGUP);
        } else {
                if (!switch_strlen_zero(caller_profile->dialplan)) {
@@ -1706,7 +1706,7 @@ static void switch_core_standard_on_ring(switch_core_session *session)
 
                if (!dialplan_interface) {
                        if (switch_channel_test_flag(session->channel, CF_OUTBOUND)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No Dialplan, changing state to TRANSMIT\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "No Dialplan, changing state to TRANSMIT\n");
                                switch_channel_set_state(session->channel, CS_TRANSMIT);
                                return;
                        }
@@ -1727,26 +1727,26 @@ static void switch_core_standard_on_execute(switch_core_session *session)
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Standard EXECUTE\n");
        if ((extension = switch_channel_get_caller_extension(session->channel)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No Extension!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Extension!\n");
                switch_channel_set_state(session->channel, CS_HANGUP);
                return;
        }
 
        while (switch_channel_get_state(session->channel) == CS_EXECUTE && extension->current_application) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Execute %s(%s)\n",
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Execute %s(%s)\n",
                                                          extension->current_application->application_name,
                                                          extension->current_application->application_data);
                if (
                        (application_interface =
                         switch_loadable_module_get_application_interface(extension->current_application->application_name)) == 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid Application %s\n",
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Application %s\n",
                                                                  extension->current_application->application_name);
                        switch_channel_set_state(session->channel, CS_HANGUP);
                        return;
                }
 
                if (!application_interface->application_function) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No Function for %s\n",
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Function for %s\n",
                                                                  extension->current_application->application_name);
                        switch_channel_set_state(session->channel, CS_HANGUP);
                        return;
@@ -1847,12 +1847,12 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
 
                        switch (state) {
                        case CS_NEW:            /* Just created, Waiting for first instructions */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State NEW\n", switch_channel_get_name(session->channel));
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "(%s) State NEW\n", switch_channel_get_name(session->channel));
                                break;
                        case CS_DONE:
                                continue;
                        case CS_HANGUP: /* Deactivate and end the thread */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State HANGUP\n", switch_channel_get_name(session->channel));
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "(%s) State HANGUP\n", switch_channel_get_name(session->channel));
                                if (!driver_state_handler->on_hangup ||
                                        (driver_state_handler->on_hangup &&
                                         driver_state_handler->on_hangup(session) == SWITCH_STATUS_SUCCESS &&
@@ -1891,7 +1891,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
                                midstate = switch_channel_get_state(session->channel);
                                break;
                        case CS_INIT:           /* Basic setup tasks */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State INIT\n", switch_channel_get_name(session->channel));
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "(%s) State INIT\n", switch_channel_get_name(session->channel));
                                if (!driver_state_handler->on_init ||
                                        (driver_state_handler->on_init &&
                                         driver_state_handler->on_init(session) == SWITCH_STATUS_SUCCESS &&
@@ -1927,7 +1927,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
                                }
                                break;
                        case CS_RING:           /* Look for a dialplan and find something to do */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State RING\n", switch_channel_get_name(session->channel));
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "(%s) State RING\n", switch_channel_get_name(session->channel));
                                if (!driver_state_handler->on_ring ||
                                        (driver_state_handler->on_ring &&
                                         driver_state_handler->on_ring(session) == SWITCH_STATUS_SUCCESS &&
@@ -1963,7 +1963,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
                                }
                                break;
                        case CS_EXECUTE:        /* Execute an Operation */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State EXECUTE\n", switch_channel_get_name(session->channel));
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "(%s) State EXECUTE\n", switch_channel_get_name(session->channel));
                                if (!driver_state_handler->on_execute ||
                                        (driver_state_handler->on_execute &&
                                         driver_state_handler->on_execute(session) == SWITCH_STATUS_SUCCESS &&
@@ -1999,7 +1999,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
                                }
                                break;
                        case CS_LOOPBACK:       /* loop all data back to source */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State LOOPBACK\n", switch_channel_get_name(session->channel));
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "(%s) State LOOPBACK\n", switch_channel_get_name(session->channel));
                                if (!driver_state_handler->on_loopback ||
                                        (driver_state_handler->on_loopback &&
                                         driver_state_handler->on_loopback(session) == SWITCH_STATUS_SUCCESS &&
@@ -2035,7 +2035,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
                                }
                                break;
                        case CS_TRANSMIT:       /* send/recieve data to/from another channel */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State TRANSMIT\n", switch_channel_get_name(session->channel));
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "(%s) State TRANSMIT\n", switch_channel_get_name(session->channel));
                                if (!driver_state_handler->on_transmit ||
                                        (driver_state_handler->on_transmit &&
                                         driver_state_handler->on_transmit(session) == SWITCH_STATUS_SUCCESS &&
@@ -2163,7 +2163,7 @@ SWITCH_DECLARE(void) switch_core_launch_thread(switch_thread_start_t func, void
        mypool = pool ? 0 : 1;
 
        if (!pool && switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not allocate memory pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Could not allocate memory pool\n");
                return;
        }
 
@@ -2171,7 +2171,7 @@ SWITCH_DECLARE(void) switch_core_launch_thread(switch_thread_start_t func, void
        switch_threadattr_detach_set(thd_attr, 1);
 
        if ((ts = switch_core_alloc(pool, sizeof(*ts))) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not allocate memory\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Could not allocate memory\n");
        } else {
                if (mypool) {
                        ts->pool = pool;
@@ -2194,7 +2194,7 @@ static void *SWITCH_THREAD_FUNC switch_core_session_thread(switch_thread *thread
        switch_core_hash_insert(runtime.session_table, session->uuid_str, session);
        switch_core_session_run(session);
        switch_core_hash_delete(runtime.session_table, session->uuid_str);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Session %u (%s) Ended\n", session->id, switch_channel_get_name(session->channel));
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Session %u (%s) Ended\n", session->id, switch_channel_get_name(session->channel));
        switch_core_session_destroy(&session);
        return NULL;
 }
@@ -2257,18 +2257,18 @@ SWITCH_DECLARE(switch_core_session *) switch_core_session_request(const switch_e
        if (pool) {
                usepool = pool;
        } else if (switch_core_new_memory_pool(&usepool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not allocate memory pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Could not allocate memory pool\n");
                return NULL;
        }
 
        if ((session = switch_core_alloc(usepool, sizeof(switch_core_session))) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not allocate session\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Could not allocate session\n");
                apr_pool_destroy(usepool);
                return NULL;
        }
 
        if (switch_channel_alloc(&session->channel, usepool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not allocate channel structure\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not allocate channel structure\n");
                apr_pool_destroy(usepool);
                return NULL;
        }
@@ -2306,7 +2306,7 @@ SWITCH_DECLARE(switch_core_session *) switch_core_session_request_by_name(char *
        const switch_endpoint_interface *endpoint_interface;
 
        if ((endpoint_interface = switch_loadable_module_get_endpoint_interface(endpoint_name)) == 0) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not locate channel type %s\n", endpoint_name);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not locate channel type %s\n", endpoint_name);
                return NULL;
        }
 
@@ -2421,7 +2421,7 @@ static void core_event_handler(switch_event *event)
                                                                &errmsg
                                                                );              
                        if (errmsg) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SQL ERR [%s]\n", errmsg);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL ERR [%s]\n", errmsg);
                                switch_core_db_free(errmsg);
                                switch_yield(100000);
                                max--;
@@ -2472,7 +2472,7 @@ SWITCH_DECLARE(switch_status) switch_core_init(char *console)
 
        
        if (apr_pool_create(&runtime.memory_pool, NULL) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not allocate memory pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Could not allocate memory pool\n");
                switch_core_destroy();
                return SWITCH_STATUS_MEMERR;
        }
@@ -2500,7 +2500,7 @@ SWITCH_DECLARE(switch_status) switch_core_init(char *console)
 
        /* Activate SQL database */
        if ((runtime.db = switch_core_db_handle()) == 0 ) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error Opening DB!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB!\n");
        } else {
                char create_channels_sql[] =
                        "CREATE TABLE channels (\n"
@@ -2530,7 +2530,7 @@ SWITCH_DECLARE(switch_status) switch_core_init(char *console)
                        "   callee_uuid      VARCHAR(255)\n"
                        ");\n";
 
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Opening DB\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Opening DB\n");
                switch_core_db_exec(runtime.db, "drop table channels", NULL, NULL, NULL);
                switch_core_db_exec(runtime.db, "drop table calls", NULL, NULL, NULL);
                switch_core_db_exec(runtime.db, create_channels_sql, NULL, NULL, NULL);
@@ -2538,7 +2538,7 @@ SWITCH_DECLARE(switch_status) switch_core_init(char *console)
                
                if (switch_event_bind("core_db", SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, core_event_handler, NULL) !=
                        SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't bind event handler!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind event handler!\n");
                }
        }
 
index fcd362700461054e62370cf02df1e3a0af0a23eb..f74fb7761b9f82f6dd5ee0d40194a5f057c73e65 100644 (file)
@@ -278,7 +278,7 @@ SWITCH_DECLARE(switch_status) switch_event_init(switch_memory_pool *pool)
 
 
        if (switch_core_new_memory_pool(&THRUNTIME_POOL) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not allocate memory pool\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Could not allocate memory pool\n");
                return SWITCH_STATUS_MEMERR;
        }
        /*
@@ -292,7 +292,7 @@ SWITCH_DECLARE(switch_status) switch_event_init(switch_memory_pool *pool)
        switch_queue_create(&EVENT_QUEUE[1], POOL_COUNT_MAX + 10, THRUNTIME_POOL);
        switch_queue_create(&EVENT_QUEUE[2], POOL_COUNT_MAX + 10, THRUNTIME_POOL);
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activate Eventing Engine.\n");
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activate Eventing Engine.\n");
        switch_mutex_init(&BLOCK, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
        switch_mutex_init(&POOL_LOCK, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
        switch_core_hash_init(&CUSTOM_HASH, RUNTIME_POOL);
index 82c1e916fa0e96b4ce6bc8a2fd6face1f3769b00..a9d461e8fe7bdb2d48bedbcf51b19c7b1b978e94 100644 (file)
@@ -198,7 +198,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_record_file(switch_core_session *sessio
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n");
                switch_core_session_set_read_codec(session, &codec);            
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed %s@%uhz %u channels %dms\n",
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Raw Codec Activation Failed %s@%uhz %u channels %dms\n",
                                                          codec_name, fh->samplerate, fh->channels, read_codec->implementation->microseconds_per_frame / 1000);
                switch_core_file_close(fh);
                return SWITCH_STATUS_GENERR;
@@ -314,7 +314,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
 
        if (timer_name) {
                if (switch_core_timer_init(&timer, timer_name, interval, samples, pool) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "setup timer failed!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "setup timer failed!\n");
                        switch_core_codec_destroy(&codec);
                        switch_core_file_close(fh);
                        return SWITCH_STATUS_GENERR;
@@ -433,7 +433,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
                for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
 
                        if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Bad Write\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
                                done = 1;
                                break;
                        }
@@ -513,7 +513,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
                                                                (unsigned int)rate,
                                                                &flags,
                                                                switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid TTS module!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module!\n");
                return SWITCH_STATUS_FALSE;
        }
 
@@ -550,7 +550,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
 
        if (timer_name) {
                if (switch_core_timer_init(&timer, timer_name, interval, (int)samples, pool) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "setup timer failed!\n");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "setup timer failed!\n");
                        switch_core_codec_destroy(&codec);
                        flags = 0;
                        switch_core_speech_close(&sh, &flags);
@@ -570,7 +570,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
        for( x = 0; !done && x < lead_in_out; x++) {
                for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
                        if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Bad Write\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
                                done = 1;
                                break;
                        }
@@ -620,7 +620,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
                        for( x = 0; !done && x < lead_in_out; x++) {
                                for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
                                        if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Bad Write\n");
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
                                                done = 1;
                                                break;
                                        }
@@ -638,7 +638,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
 
                for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
                        if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Bad Write\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
                                done = 1;
                                break;
                        }
@@ -762,11 +762,11 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
 
 
                        if (switch_core_session_write_frame(session_b, read_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "write: %s Bad Frame....[%u] Bubye!\n", switch_channel_get_name(chan_b), read_frame->datalen);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "write: %s Bad Frame....[%u] Bubye!\n", switch_channel_get_name(chan_b), read_frame->datalen);
                                data->running = -1;
                        }
                } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "read: %s Bad Frame.... Bubye!\n", switch_channel_get_name(chan_a));
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "read: %s Bad Frame.... Bubye!\n", switch_channel_get_name(chan_a));
                        data->running = -1;
                }
 
index 89c23c3b86b66eb796ce59470eca8cb857ebdb64..95a12c556641091ccb4adab581a779155a876b30 100644 (file)
@@ -237,7 +237,7 @@ static void process_module_file(char *dir, char *fname)
                if (new_module->interface->endpoint_interface) {
                        const switch_endpoint_interface *ptr;
                        for (ptr = new_module->interface->endpoint_interface; ptr; ptr = ptr->next) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding Endpoint '%s'\n", ptr->interface_name);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Endpoint '%s'\n", ptr->interface_name);
                                switch_core_hash_insert(loadable_modules.endpoint_hash, (char *) ptr->interface_name, (void *) ptr);
                        }
                }
@@ -248,7 +248,7 @@ static void process_module_file(char *dir, char *fname)
 
                        for (ptr = new_module->interface->codec_interface; ptr; ptr = ptr->next) {
                                for (impl = ptr->implementations; impl; impl = impl->next) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,
                                                                                  "Adding Codec '%s' (%s) %dkhz %dms\n",
                                                                                  ptr->iananame,
                                                                                  ptr->interface_name,
@@ -263,7 +263,7 @@ static void process_module_file(char *dir, char *fname)
                        const switch_dialplan_interface *ptr;
 
                        for (ptr = new_module->interface->dialplan_interface; ptr; ptr = ptr->next) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding Dialplan '%s'\n", ptr->interface_name);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Dialplan '%s'\n", ptr->interface_name);
                                switch_core_hash_insert(loadable_modules.dialplan_hash, (char *) ptr->interface_name, (void *) ptr);
                        }
                }
@@ -272,7 +272,7 @@ static void process_module_file(char *dir, char *fname)
                        const switch_timer_interface *ptr;
 
                        for (ptr = new_module->interface->timer_interface; ptr; ptr = ptr->next) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding Timer '%s'\n", ptr->interface_name);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Timer '%s'\n", ptr->interface_name);
                                switch_core_hash_insert(loadable_modules.timer_hash, (char *) ptr->interface_name, (void *) ptr);
                        }
                }
@@ -281,7 +281,7 @@ static void process_module_file(char *dir, char *fname)
                        const switch_application_interface *ptr;
 
                        for (ptr = new_module->interface->application_interface; ptr; ptr = ptr->next) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding Application '%s'\n", ptr->interface_name);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Application '%s'\n", ptr->interface_name);
                                switch_core_hash_insert(loadable_modules.application_hash,
                                                                                (char *) ptr->interface_name, (void *) ptr);
                        }
@@ -291,7 +291,7 @@ static void process_module_file(char *dir, char *fname)
                        const switch_api_interface *ptr;
 
                        for (ptr = new_module->interface->api_interface; ptr; ptr = ptr->next) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding API Function '%s'\n", ptr->interface_name);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding API Function '%s'\n", ptr->interface_name);
                                switch_core_hash_insert(loadable_modules.api_hash, (char *) ptr->interface_name, (void *) ptr);
                        }
                }
@@ -302,7 +302,7 @@ static void process_module_file(char *dir, char *fname)
                        for (ptr = new_module->interface->file_interface; ptr; ptr = ptr->next) {
                                int i;
                                for (i = 0; ptr->extens[i]; i++) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding File Format '%s'\n", ptr->extens[i]);
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding File Format '%s'\n", ptr->extens[i]);
                                        switch_core_hash_insert(loadable_modules.file_hash, (char *) ptr->extens[i], (void *) ptr);
                                }
                        }
@@ -312,7 +312,7 @@ static void process_module_file(char *dir, char *fname)
                        const switch_speech_interface *ptr;
 
                        for (ptr = new_module->interface->speech_interface; ptr; ptr = ptr->next) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding Speech interface '%s'\n", ptr->interface_name);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Speech interface '%s'\n", ptr->interface_name);
                                switch_core_hash_insert(loadable_modules.speech_hash, (char *) ptr->interface_name, (void *) ptr);
                        }
                }
@@ -321,7 +321,7 @@ static void process_module_file(char *dir, char *fname)
                        const switch_directory_interface *ptr;
 
                        for (ptr = new_module->interface->directory_interface; ptr; ptr = ptr->next) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding Directory interface '%s'\n", ptr->interface_name);
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Directory interface '%s'\n", ptr->interface_name);
                                switch_core_hash_insert(loadable_modules.directory_hash, (char *) ptr->interface_name, (void *) ptr);
                        }
                }
index 67b8f38eed0353672c2c2fec0d1806414ec671d6..e3a15242e74c1fdf11c4cbff2e53e8dfb2fe0350 100644 (file)
@@ -65,7 +65,7 @@ SWITCH_DECLARE(switch_status) switch_resample_create(switch_audio_resampler **ne
        resampler->factor = (lto_rate / lfrom_rate);
 
        resampler->resampler = resample_open(QUALITY, resampler->factor, resampler->factor);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activate Resampler %d->%d %f\n", resampler->from_rate,
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Activate Resampler %d->%d %f\n", resampler->from_rate,
                                                  resampler->to_rate, resampler->factor);
        resampler->from_size = from_size;
        resampler->from = (float *) switch_core_alloc(pool, resampler->from_size);
index d5b9d9ab9716e8b65ed2266e481924f4246724f3..cc9fdc24eec7dcbc188b4337b7ea6d0ebfd594d0 100644 (file)
@@ -108,7 +108,7 @@ static switch_status ice_out(switch_rtp *rtp_session)
                        elapsed = (unsigned int)((switch_time_now() - rtp_session->last_stun) / 1000);
 
                        if (elapsed > 10000) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No stun for a long time (PUNT!)\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No stun for a long time (PUNT!)\n");
                                return SWITCH_STATUS_FALSE;
                        }
                }
@@ -295,7 +295,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp **new_rtp_session,
     
                /* check that hex string is the right length */
                if (len < MASTER_KEY_LEN*2) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR
                                                                  "error: too few digits in key/salt "
                                                                  "(should be %d hexadecimal digits, found %d)\n",
                                                                  MASTER_KEY_LEN*2, len);
@@ -303,7 +303,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp **new_rtp_session,
                        return SWITCH_STATUS_FALSE;
                } 
                if (strlen(crypto_key) > MASTER_KEY_LEN*2) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR
                                                                  "error: too many digits in key/salt "
                                                                  "(should be %d hexadecimal digits, found %u)\n",
                                                                  MASTER_KEY_LEN*2, (unsigned)strlen(crypto_key));
@@ -313,7 +313,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp **new_rtp_session,
     
                //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "set master key/salt to %s/", octet_string_hex_string(key, 16));
                //switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "%s\n", octet_string_hex_string(key+16, 14));
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activating Secure RTP!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activating Secure RTP!\n");
        }
 
        rtp_session->send_msg.header.ssrc    = htonl(ssrc);
@@ -346,12 +346,12 @@ SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp **new_rtp_session,
                err_status_t stat;
 
                if ((stat = srtp_create(&rtp_session->recv_ctx, &policy))) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error allocating srtp [%d]\n", stat);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error allocating srtp [%d]\n", stat);
                        *err = "Crypt Error";
                        return SWITCH_STATUS_FALSE;
                }
                if ((stat = srtp_create(&rtp_session->send_ctx, &policy))) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error allocating srtp [%d]\n", stat);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error allocating srtp [%d]\n", stat);
                        *err = "Crypt Error";
                        return SWITCH_STATUS_FALSE;
                }
@@ -485,7 +485,7 @@ static int rtp_common_read(switch_rtp *rtp_session, void *data, int *payload_typ
 
                        stat = srtp_unprotect(rtp_session->recv_ctx, &rtp_session->recv_msg.header, &sbytes);
                        if (stat) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
                                                "error: srtp unprotection failed with code %d%s\n", stat,
                                                stat == err_status_replay_fail ? " (replay check failed)" :
                                                stat == err_status_auth_fail ? " (auth check failed)" : "");
@@ -580,7 +580,7 @@ static int rtp_common_write(switch_rtp *rtp_session, void *data, uint32_t datale
        if (rtp_session->packet_size > datalen && (payload == rtp_session->payload)) {
                if (!rtp_session->packet_buffer) {
                        if (switch_buffer_create(rtp_session->pool, &rtp_session->packet_buffer, rtp_session->packet_size * 2) != SWITCH_STATUS_SUCCESS) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Buffer memory error\n");
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Buffer memory error\n");
                                return -1;
                        }
                }
@@ -602,7 +602,7 @@ static int rtp_common_write(switch_rtp *rtp_session, void *data, uint32_t datale
 
                stat = srtp_protect(rtp_session->send_ctx, &rtp_session->send_msg.header, &sbytes);
                if (stat) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "error: srtp unprotection failed with code %d\n", stat);
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "error: srtp unprotection failed with code %d\n", stat);
                }
 
                bytes = sbytes;