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

N A asteriskteam at digium.com
Thu Aug 26 17:23:06 CDT 2021


Attention is currently required from: Joshua Colp, George Joseph.
N A 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/6e554ff7_3cf27181 
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);
              : 		}
> Custom levels that were removed from the parameter don't get unregistered. […]
Doesn't this auto-remove all the log channels, though, regardless of whether they are dynamic or not?

/* delete our list of log channels */
while ((chan = AST_RWLIST_REMOVE_HEAD(&logchannels, list))) {
	ast_free(chan);
}



-- 
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: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Thu, 26 Aug 2021 22:23:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
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/20210826/fdb3fdb9/attachment.html>


More information about the asterisk-code-review mailing list