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

Corey Farrell asteriskteam at digium.com
Fri Jan 12 11:42:37 CST 2018


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/7896 )

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


Patch Set 1: Code-Review-1

(7 comments)

We discussed on IRC and I believe this is the correct approach to fix this issue.  This still needs to be mentioned in CHANGES.

https://gerrit.asterisk.org/#/c/7896/1/main/config.c
File main/config.c:

https://gerrit.asterisk.org/#/c/7896/1/main/config.c@2194
PS1, Line 2194: 				ast_verb(4, "Parsing '%s': Found\n", fn);
Let's just remove this line, the debug is good enough.


https://gerrit.asterisk.org/#/c/7896/1/main/pbx.c
File main/pbx.c:

https://gerrit.asterisk.org/#/c/7896/1/main/pbx.c@6210
PS1, Line 6210: 		ast_verb(6, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);
Please switch to ast_debug(1, ...)


https://gerrit.asterisk.org/#/c/7896/1/main/pbx.c@6217
PS1, Line 6217: 		ast_verb(6, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);
This and the one just above can be de-duplicated, just do a single ast_debug before the return.


https://gerrit.asterisk.org/#/c/7896/1/main/pbx.c@6467
PS1, Line 6467: 	while ((tmp = ast_hashtab_next(iter))) {
This is a good place to count the contexts, ++ctx_count per run of the loop.


https://gerrit.asterisk.org/#/c/7896/1/main/pbx.c@6642
PS1, Line 6642: 	ast_verb(3,"Total time merge_contexts_delete: %8.6f sec\n", ft);
After these lets add a message:
ast_verb(3, "%s successfully loaded %d contexts (enable debug for details).\n", registrar, ctx_count);

This will tell how many contexts were loaded (appropriate for verbose 3) and tell people where to find the debug messages so they don't file a bug about this change.


https://gerrit.asterisk.org/#/c/7896/1/main/pbx.c@6702
PS1, Line 6702: 	ast_verb(6, "Including context '%s' in context '%s'\n",
Please switch to ast_debug(1, ...)


https://gerrit.asterisk.org/#/c/7896/1/main/pbx.c@7519
PS1, Line 7519: 	if (tmp->matchcid == AST_EXT_MATCHCID_ON) {
              : 		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(6, "Added extension '%s' priority %d to %s\n",
              : 				 tmp->name, tmp->priority, con->name);
              : 	}
Let's remove this, the ast_debug just above is enough.



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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: comment
Gerrit-Change-Id: I5662902161c50890997ddc56835d4cafb456c529
Gerrit-Change-Number: 7896
Gerrit-PatchSet: 1
Gerrit-Owner: Benoît Dereck-Tricot <benoit.dereck-tricot at eyepea.eu>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Fri, 12 Jan 2018 17:42:37 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180112/2fe01c2d/attachment.html>


More information about the asterisk-code-review mailing list