[Asterisk-code-review] res_pjsip_logger: Add method-based logging option. (asterisk[master])
N A
asteriskteam at digium.com
Thu Jul 21 12:39:06 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:
(2 comments)
File res/res_pjsip_logger.c:
https://gerrit.asterisk.org/c/asterisk/+/18824/comment/e3f02861_36180905
PS1, Line 183: if (session->log_methods.log_method_invite && !pjsip_method_cmp(method, &pjsip_invite_method)) {
> According to the description "only logging messages of particular method(s)" […]
This is the code to check if a message should not be logged, so if we know it should be, log it. A message can only be of one method. (This isn't the enable logging code)
https://gerrit.asterisk.org/c/asterisk/+/18824/comment/36e41b8d_7214dec7
PS1, Line 443: memset(&default_logger->log_methods, 0, sizeof(default_logger->log_methods));
> According to the description "only logging messages of particular method(s)" […]
Correct, so they get reset each time.
Multiple methods can be specified pipe-separated
e.g.
pjsip set logger method INVITE|REGISTER
This is in the USAGE.
--
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 17:39:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
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/34b91cf4/attachment.html>
More information about the asterisk-code-review
mailing list