[Asterisk-code-review] logger: Add custom logging capabilities (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Mon Aug 30 16:29:16 CDT 2021


Attention is currently required from: N A, Joshua Colp, George Joseph.
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16222 )

Change subject: logger: Add custom logging capabilities
......................................................................


Patch Set 10:

(1 comment)

File main/logger.c:

https://gerrit.asterisk.org/c/asterisk/+/16222/comment/69440a7a_e79c16dd 
PS10, Line 818: registercustomlevels:;
              : 		while ((logfile = strsep(&customlogs, ","))) {
              : 			unsigned int level;
              : 			/* if we are reloading, we don't want to re-register levels that exist */
              : 			for (level = 16; level < ARRAY_LEN(levels); level++) {
              : 				if (levels[level] && !strcasecmp(levels[level], logfile)) {
              : 					/* need to continue the outer loop, not the inner loop */
              : 					goto registercustomlevels; /* already exists, skip */
              : 				}
              : 			}
              : 			/* Lock already held, so directly register the level */
              : 			logger_register_level(logfile);
              : 		}
> Doesn't this auto-remove all the log channels, though, regardless of whether they are dynamic or not […]
That removes all channels, but does not unregister any levels. If a level is no longer specified then 'ast_logger_unregister_level' should probably be called on reload for it.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16222
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: If082703cf81a436ae5a565c75225fa8c0554b702
Gerrit-Change-Number: 16222
Gerrit-PatchSet: 10
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Mon, 30 Aug 2021 21:29:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210830/a46d69e5/attachment.html>


More information about the asterisk-code-review mailing list