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

Alexei Gradinari asteriskteam at digium.com
Thu Jul 21 14:49:32 CDT 2022


Attention is currently required from: N A.
Alexei Gradinari 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: -Code-Review

(3 comments)

File res/res_pjsip_logger.c:

https://gerrit.asterisk.org/c/asterisk/+/18824/comment/9f01a04d_9cdc5a68 
PS1, Line 103: struct pjsip_method_logger {
Lack of other methods:
SUBSCRIBE
NOTIFY
PUBLISH
PRACK
INFO
REFER
MESSAGE
UPDATE


https://gerrit.asterisk.org/c/asterisk/+/18824/comment/6a456fc2_2688100e 
PS1, Line 183: 	if (session->log_methods.log_method_invite && !pjsip_method_cmp(method, &pjsip_invite_method)) {
> This is the code to check if a message should not be logged, so if we know it should be, log it. […]
My bad. I thought return 1 - not logging.
But in this case this code does not take into account ip-address filter.
So I can not set filter by ip-address and method(s)


https://gerrit.asterisk.org/c/asterisk/+/18824/comment/790e3793_b42dbef9 
PS1, Line 443: 	memset(&default_logger->log_methods, 0, sizeof(default_logger->log_methods));
> Correct, so they get reset each time. […]
My bad. I didn't pay attention that this is substring comparison.
Personally, I don't like it because there is not checking on correct separator or the lack of a separator.



-- 
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: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Thu, 21 Jul 2022 19:49:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
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/dda3ce50/attachment-0001.html>


More information about the asterisk-code-review mailing list