<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7982">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pbx: Reduce verbosity while loading extensions<br><br>Each time the dial plan is reloaded, a lot of logs like these are generated:<br>"Added extension 'XXXXX' priority 1 to YYYYYYYYYYY"<br>This patch changes the log level for those logs.<br><br>ASTERISK-27084<br><br>Change-Id: I5662902161c50890997ddc56835d4cafb456c529<br>---<br>M CHANGES<br>M main/config.c<br>M main/pbx.c<br>3 files changed, 16 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/7982/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/CHANGES b/CHANGES<br>index ec533e8..c11f871 100644<br>--- a/CHANGES<br>+++ b/CHANGES<br>@@ -57,6 +57,16 @@<br> built.<br> <br> ------------------------------------------------------------------------------<br>+--- Functionality changes from Asterisk 15.2.0 to Asterisk 15.3.0 ------------<br>+------------------------------------------------------------------------------<br>+<br>+Core<br>+------------------<br>+ * During dialplan reload log messages are produced for each context,<br>+ extension and include. These messages are no longer printed by the<br>+ verbose loggers, they are now only logged as debug messages.<br>+<br>+------------------------------------------------------------------------------<br> --- Functionality changes from Asterisk 15.1.0 to Asterisk 15.2.0 ------------<br> ------------------------------------------------------------------------------<br> <br>diff --git a/main/config.c b/main/config.c<br>index a76d087..3fbbacf 100644<br>--- a/main/config.c<br>+++ b/main/config.c<br>@@ -2191,7 +2191,6 @@<br> /* If we get to this point, then we're loading regardless */<br> ast_clear_flag(&flags, CONFIG_FLAG_FILEUNCHANGED);<br> ast_debug(1, "Parsing %s\n", fn);<br>- ast_verb(2, "Parsing '%s': Found\n", fn);<br> while (!feof(f)) {<br> lineno++;<br> if (fgets(buf, sizeof(buf), f)) {<br>diff --git a/main/pbx.c b/main/pbx.c<br>index b850e8e..3b487e6 100644<br>--- a/main/pbx.c<br>+++ b/main/pbx.c<br>@@ -6207,15 +6207,14 @@<br> *local_contexts = tmp;<br> ast_hashtab_insert_safe(contexts_table, tmp); /*put this context into the tree */<br> ast_unlock_contexts();<br>- ast_verb(3, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);<br> } else {<br> tmp->next = *local_contexts;<br> if (exttable)<br> ast_hashtab_insert_immediate(exttable, tmp); /*put this context into the tree */<br> <br> *local_contexts = tmp;<br>- ast_verb(3, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);<br> }<br>+ ast_debug(1, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);<br> return tmp;<br> }<br> <br>@@ -6245,7 +6244,7 @@<br> {<br> int idx;<br> <br>- 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);<br>+ 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);<br> /* copy in the includes, switches, and ignorepats */<br> /* walk through includes */<br> for (idx = 0; idx < ast_context_includes_count(old); idx++) {<br>@@ -6430,6 +6429,7 @@<br> struct ast_state_cb *thiscb;<br> struct ast_hashtab_iter *iter;<br> struct ao2_iterator i;<br>+ int ctx_count = 0;<br> struct timeval begintime;<br> struct timeval writelocktime;<br> struct timeval endlocktime;<br>@@ -6465,6 +6465,7 @@<br> <br> iter = ast_hashtab_start_traversal(contexts_table);<br> while ((tmp = ast_hashtab_next(iter))) {<br>+ ++ctx_count;<br> context_merge(extcontexts, exttable, tmp, registrar);<br> }<br> ast_hashtab_end_traversal(iter);<br>@@ -6640,6 +6641,7 @@<br> ft = ast_tvdiff_us(enddeltime, begintime);<br> ft /= 1000000.0;<br> ast_verb(3,"Total time merge_contexts_delete: %8.6f sec\n", ft);<br>+ ast_verb(3, "%s successfully loaded %d contexts (enable debug for details).\n", registrar, ctx_count);<br> }<br> <br> /*<br>@@ -6699,7 +6701,7 @@<br> ast_unlock_context(con);<br> return -1;<br> }<br>- ast_verb(3, "Including context '%s' in context '%s'\n",<br>+ ast_debug(1, "Including context '%s' in context '%s'\n",<br> ast_get_include_name(new_include), ast_get_context_name(con));<br> <br> ast_unlock_context(con);<br>@@ -7514,14 +7516,6 @@<br> ast_debug(1, "Added extension '%s' priority %d to %s (%p)\n",<br> tmp->name, tmp->priority, con->name, con);<br> }<br>- }<br>-<br>- if (tmp->matchcid == AST_EXT_MATCHCID_ON) {<br>- ast_verb(3, "Added extension '%s' priority %d (CID match '%s') to %s\n",<br>- tmp->name, tmp->priority, tmp->cidmatch_display, con->name);<br>- } else {<br>- ast_verb(3, "Added extension '%s' priority %d to %s\n",<br>- tmp->name, tmp->priority, con->name);<br> }<br> <br> return 0;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7982">change 7982</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7982"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I5662902161c50890997ddc56835d4cafb456c529 </div>
<div style="display:none"> Gerrit-Change-Number: 7982 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: BenoƮt Dereck-Tricot <benoit.dereck-tricot@eyepea.eu> </div>