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

N A asteriskteam at digium.com
Wed Sep 15 13:09:21 CDT 2021


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

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


Patch Set 14:

(2 comments)

File main/logger.c:

https://gerrit.asterisk.org/c/asterisk/+/16222/comment/012158d5_14fcc4e7 
PS14, Line 832: 		for (level = 16; level < ARRAY_LEN(levels); level++) {
              : 			if (levels[level] && custom_dynamic_levels[level]) {
              : 				logger_unregister_level(levels[level]);
              : 				custom_dynamic_levels[level] = 0;
              : 			}
              : 		}
> If I understand this bit of code correctly then all currently registered custom dynamic levels get u […]
I don't see why that couldn't happen so I should probably try to work around that. I initially wanted to remove only levels that weren't reloaded, but as you pointed out there might not be space, so I'll need 3 steps then, I think.

I don't think strstr suffices because you could have a custom level named such that it is a proper subset of another name, and then it would return true even if the subset name was removed. I think I need to, at the very least, store the names in a temporary array, then iterate through the array to check. Maybe a bit more work, but guarantees the correct behavior.


https://gerrit.asterisk.org/c/asterisk/+/16222/comment/f372d8ce_4dfd60e3 
PS14, Line 2599: ast_
> You have to call the non-locked version. […]
Done



-- 
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: 14
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-Reviewer: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Wed, 15 Sep 2021 18:09:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210915/1dcd5539/attachment.html>


More information about the asterisk-code-review mailing list