[Asterisk-code-review] pbx: Reduce verbosity while loading extensions (asterisk[15])

Benoît Dereck-Tricot asteriskteam at digium.com
Tue Jan 9 12:25:13 CST 2018


Benoît Dereck-Tricot has uploaded this change for review. ( https://gerrit.asterisk.org/7896


Change subject: pbx: Reduce verbosity while loading extensions
......................................................................

pbx: Reduce verbosity while loading extensions

Each time the dial plan is reloaded, a lot of logs like these are generated:
"Added extension 'XXXXX' priority 1 to YYYYYYYYYYY"
This patch changes the log level for those logs.

ASTERISK-27084

Change-Id: I5662902161c50890997ddc56835d4cafb456c529
---
M main/config.c
M main/pbx.c
2 files changed, 7 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/96/7896/1

diff --git a/main/config.c b/main/config.c
index a76d087..dfcd570 100644
--- a/main/config.c
+++ b/main/config.c
@@ -2191,7 +2191,7 @@
 				/* If we get to this point, then we're loading regardless */
 				ast_clear_flag(&flags, CONFIG_FLAG_FILEUNCHANGED);
 				ast_debug(1, "Parsing %s\n", fn);
-				ast_verb(2, "Parsing '%s': Found\n", fn);
+				ast_verb(4, "Parsing '%s': Found\n", fn);
 				while (!feof(f)) {
 					lineno++;
 					if (fgets(buf, sizeof(buf), f)) {
diff --git a/main/pbx.c b/main/pbx.c
index b850e8e..039278e 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -6207,14 +6207,14 @@
 		*local_contexts = tmp;
 		ast_hashtab_insert_safe(contexts_table, tmp); /*put this context into the tree */
 		ast_unlock_contexts();
-		ast_verb(3, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);
+		ast_verb(6, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);
 	} else {
 		tmp->next = *local_contexts;
 		if (exttable)
 			ast_hashtab_insert_immediate(exttable, tmp); /*put this context into the tree */
 
 		*local_contexts = tmp;
-		ast_verb(3, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);
+		ast_verb(6, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);
 	}
 	return tmp;
 }
@@ -6245,7 +6245,7 @@
 {
 	int idx;
 
-	ast_verb(3, "merging incls/swits/igpats from old(%s) to new(%s) context, registrar = %s\n", ast_get_context_name(old), ast_get_context_name(new), registrar);
+	ast_verb(6, "merging incls/swits/igpats from old(%s) to new(%s) context, registrar = %s\n", ast_get_context_name(old), ast_get_context_name(new), registrar);
 	/* copy in the includes, switches, and ignorepats */
 	/* walk through includes */
 	for (idx = 0; idx < ast_context_includes_count(old); idx++) {
@@ -6699,7 +6699,7 @@
 		ast_unlock_context(con);
 		return -1;
 	}
-	ast_verb(3, "Including context '%s' in context '%s'\n",
+	ast_verb(6, "Including context '%s' in context '%s'\n",
 		ast_get_include_name(new_include), ast_get_context_name(con));
 
 	ast_unlock_context(con);
@@ -7517,10 +7517,10 @@
 	}
 
 	if (tmp->matchcid == AST_EXT_MATCHCID_ON) {
-		ast_verb(3, "Added extension '%s' priority %d (CID match '%s') to %s\n",
+		ast_verb(6, "Added extension '%s' priority %d (CID match '%s') to %s\n",
 				 tmp->name, tmp->priority, tmp->cidmatch_display, con->name);
 	} else {
-		ast_verb(3, "Added extension '%s' priority %d to %s\n",
+		ast_verb(6, "Added extension '%s' priority %d to %s\n",
 				 tmp->name, tmp->priority, con->name);
 	}
 

-- 
To view, visit https://gerrit.asterisk.org/7896
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5662902161c50890997ddc56835d4cafb456c529
Gerrit-Change-Number: 7896
Gerrit-PatchSet: 1
Gerrit-Owner: Benoît Dereck-Tricot <benoit.dereck-tricot at eyepea.eu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180109/ca435c15/attachment.html>


More information about the asterisk-code-review mailing list