]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
general: Improve logging levels of some log messages.
authorNaveen Albert <asterisk@phreaknet.org>
Fri, 22 Jul 2022 20:57:05 +0000 (20:57 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Mon, 1 Aug 2022 13:00:31 +0000 (08:00 -0500)
Adjusts some logging levels to be more or less important,
that is more prominent when actual problems occur and less
prominent for less noteworthy things.

ASTERISK-30153 #close

Change-Id: Ifc8f7df427aa018627db462125ae744986d3261b

apps/app_stack.c
apps/app_voicemail.c
channels/chan_dahdi.c
channels/chan_iax2.c
main/manager.c
main/stasis.c
res/res_pjsip/config_transport.c
res/res_pjsip/pjsip_options.c

index 557c6f160fb4a9a9b1a345ad4e5d8605739e3290..a84a45c1b4b4a1839f217bd38631de0ac65a953c 100644 (file)
@@ -1076,7 +1076,7 @@ static int gosub_run(struct ast_channel *chan, const char *sub_args, int ignore_
                                ast_channel_name(chan), app_gosub, sub_args,
                                S_OR(pbx_builtin_getvar_helper(chan, "GOSUB_RETVAL"), ""));
                } else {
-                       ast_log(LOG_NOTICE, "%s Abnormal '%s(%s)' exit.  Popping routine return locations.\n",
+                       ast_log(LOG_WARNING, "%s Abnormal '%s(%s)' exit.  Popping routine return locations.\n",
                                ast_channel_name(chan), app_gosub, sub_args);
                        balance_stack(chan);
                        pbx_builtin_setvar_helper(chan, "GOSUB_RETVAL", "");
index 023d720e59303f7116df1b25774402a625eae69d..377d120454db49d0e0daf76bcdcb5e619186e41e 100644 (file)
@@ -11302,12 +11302,14 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
                        password[0] = '\0';
                } else {
                        if (ast_streamfile(chan, vm_password, ast_channel_language(chan))) {
-                               ast_log(AST_LOG_WARNING, "Unable to stream password file\n");
+                               if (!ast_check_hangup(chan)) {
+                                       ast_log(AST_LOG_WARNING, "Unable to stream password file\n");
+                               }
                                free_user(vmu);
                                return -1;
                        }
                        if (ast_readstring(chan, password, sizeof(password) - 1, 2000, 10000, "#") < 0) {
-                               ast_log(AST_LOG_WARNING, "Unable to read password\n");
+                               ast_log(AST_LOG_NOTICE, "Unable to read password\n");
                                free_user(vmu);
                                return -1;
                        } else if (password[0] == '*') {
index fb70225f02a74ad874e7ffd7745f1d0dd7acd5e4..253c64741715851f66f597cf78804dca74e4e203 100644 (file)
@@ -19418,7 +19418,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
                                        report_alarms = REPORT_SPAN_ALARMS;
                         }
                } else if (!(options & PROC_DAHDI_OPT_NOWARN) )
-                       ast_log(LOG_WARNING, "Ignoring any changes to '%s' (on reload) at line %d.\n", v->name, v->lineno);
+                       ast_log(LOG_NOTICE, "Ignoring any changes to '%s' (on reload) at line %d.\n", v->name, v->lineno);
        }
 
        if (dahdichan) {
index aaf5620f0a87d8f328f3c32a6525cb8aa594b37e..c1309b5828608735ba04f1a3b69965d75c9eaa4b 100644 (file)
@@ -3407,7 +3407,7 @@ static int send_packet(struct iax_frame *f)
 
        /* Called with iaxsl held */
        if (iaxdebug) {
-               ast_debug(3, "Sending %u on %d/%d to %s\n", f->ts, callno, iaxs[callno]->peercallno, ast_sockaddr_stringify(&iaxs[callno]->addr));
+               ast_debug(8, "Sending %u on %d/%d to %s\n", f->ts, callno, iaxs[callno]->peercallno, ast_sockaddr_stringify(&iaxs[callno]->addr));
        }
        if (f->transfer) {
                iax_outputframe(f, NULL, 0, &iaxs[callno]->transfer, f->datalen - sizeof(struct ast_iax2_full_hdr));
@@ -10363,7 +10363,7 @@ static int socket_process_helper(struct iax2_thread *thread)
        }
        if (ast_test_flag64(iaxs[fr->callno], IAX_ENCRYPTED) && !decrypted) {
                if (decrypt_frame(fr->callno, fh, &f, &res)) {
-                       ast_log(LOG_NOTICE, "Packet Decrypt Failed!\n");
+                       ast_log(LOG_WARNING, "Packet Decrypt Failed!\n");
                        ast_variables_destroy(ies.vars);
                        ast_mutex_unlock(&iaxsl[fr->callno]);
                        return 1;
@@ -12033,7 +12033,7 @@ immediatedial:
                iaxs[fr->callno]->last = fr->ts;
 #if 1
                if (iaxdebug)
-                       ast_debug(3, "For call=%d, set last=%u\n", fr->callno, fr->ts);
+                       ast_debug(8, "For call=%d, set last=%u\n", fr->callno, fr->ts);
 #endif
        }
 
index 2cc7c8520ea77b3b270e69d455b431b8f723cc28..d793e08508ace55ceca63e4930f6716ca4b069df 100644 (file)
@@ -6204,7 +6204,7 @@ static int match_filter(struct mansession *s, char *eventdata)
        if (manager_debug) {
                ast_verbose("<-- Examining AMI event: -->\n%s\n", eventdata);
        } else {
-               ast_debug(3, "Examining AMI event:\n%s\n", eventdata);
+               ast_debug(4, "Examining AMI event:\n%s\n", eventdata);
        }
        if (!ao2_container_count(s->session->whitefilters) && !ao2_container_count(s->session->blackfilters)) {
                return 1; /* no filtering means match all */
index 5ca35ecaf75848ca3c33778b8217c1dfac6f6524..001cc9db39206f9ea917b80e50f76cb69db58dde 100644 (file)
@@ -2298,7 +2298,7 @@ int stasis_message_type_declined(const char *name)
        ao2_cleanup(name_in_declined);
        ao2_ref(cfg, -1);
        if (res) {
-               ast_log(LOG_NOTICE, "Declining to allocate Stasis message type '%s' due to configuration\n", name);
+               ast_debug(4, "Declining to allocate Stasis message type '%s' due to configuration\n", name);
        }
        return res;
 }
index 522a89d24cfd0ced06ace3a0dce696e92878ab25..c740a55d50588f04c89a1b88c0c57a7d3aa61925 100644 (file)
@@ -562,7 +562,7 @@ static int transport_apply(const struct ast_sorcery *sorcery, void *obj)
 
        if (!transport->allow_reload && perm_state) {
                /* We inherit the transport from perm state, untouched */
-               ast_log(LOG_WARNING, "Transport '%s' is not fully reloadable, not reloading: protocol, bind, TLS, TCP, ToS, or CoS options.\n", transport_id);
+               ast_log(LOG_NOTICE, "Transport '%s' is not fully reloadable, not reloading: protocol, bind, TLS, TCP, ToS, or CoS options.\n", transport_id);
                temp_state->state->transport = perm_state->state->transport;
                perm_state->state->transport = NULL;
                temp_state->state->factory = perm_state->state->factory;
index 14013ade5ae910d3cd220746e73a7e0082db192c..4f4825778908df6db23136bba0619f4e9d86e2d8 100644 (file)
@@ -806,7 +806,7 @@ static void qualify_contact_cb(void *token, pjsip_event *e)
 
        if (ast_sip_push_task(contact_callback_data->aor_options->serializer,
                sip_options_contact_status_notify_task, contact_callback_data)) {
-               ast_log(LOG_NOTICE, "Unable to queue contact status update for '%s' on AOR '%s', state will be incorrect\n",
+               ast_log(LOG_WARNING, "Unable to queue contact status update for '%s' on AOR '%s', state will be incorrect\n",
                        ast_sorcery_object_get_id(contact_callback_data->contact),
                        contact_callback_data->aor_options->name);
                ao2_ref(contact_callback_data, -1);