[Asterisk-code-review] res_pjsip_logger: Add method-based logging option. (asterisk[master])

N A asteriskteam at digium.com
Thu Jul 21 18:55:13 CDT 2022


Attention is currently required from: Alexei Gradinari.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18824 )

Change subject: res_pjsip_logger: Add method-based logging option.
......................................................................


Patch Set 1:

(3 comments)

File res/res_pjsip_logger.c:

https://gerrit.asterisk.org/c/asterisk/+/18824/comment/e2805fcc_c7111f50 
PS1, Line 103: struct pjsip_method_logger {
> Lack of other methods: […]
The methods included are the methods that PJSIP seems to natively support: https://www.pjsip.org/pjsip/docs/html/group__PJSIP__MSG__METHOD.htm

Not sure if there's an easy way to add those other ones or not.


https://gerrit.asterisk.org/c/asterisk/+/18824/comment/7b41f492_eaa089d0 
PS1, Line 183: 	if (session->log_methods.log_method_invite && !pjsip_method_cmp(method, &pjsip_invite_method)) {
> My bad. I thought return 1 - not logging. […]
Well, it does take it into consideration, it's just that it does an OR instead of an AND.
The existing logging mechanism uses an OR, so this is consistent with that.


https://gerrit.asterisk.org/c/asterisk/+/18824/comment/75d69c50_c8d72ca9 
PS1, Line 443: 	memset(&default_logger->log_methods, 0, sizeof(default_logger->log_methods));
> My bad. I didn't pay attention that this is substring comparison. […]
I suppose that could be done, but then we'd have to check for starting with str, ending with it, or a pipe on either side. Technically a user could use a different delimiter and it would work, you are right. Didn't seem like an issue to me but if folks feel that way I guess we could change that - just seemed a little more efficient than using strsep and doing a loop through to check them all. I could go either way.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Idd03bd9b466b40e4bca7769437d52ac13a957cf9
Gerrit-Change-Number: 18824
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Attention: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Comment-Date: Thu, 21 Jul 2022 23:55:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220721/135e368e/attachment.html>


More information about the asterisk-code-review mailing list