[Asterisk-code-review] logger: Add custom logging capabilities (asterisk[master])
N A
asteriskteam at digium.com
Thu Jul 29 15:57:15 CDT 2021
Attention is currently required from: Joshua Colp.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16222 )
Change subject: logger: Add custom logging capabilities
......................................................................
Patch Set 4:
(5 comments)
File configs/samples/logger.conf.sample:
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/02323022_dd8b8e35
PS3, Line 88: ; Any custom logging levels you may want to use, which can then
> This doesn't specify or show an example of how multiple are specified
Done
File include/asterisk/logger.h:
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/7e3bc2df_c2e621de
PS3, Line 338: int ast_dynamic_logger_level_exists(const char *name);
> The name of this function does not match the behavior. […]
Done
File main/logger.c:
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/b49a24ba_6a314ccf
PS3, Line 1887: if (!(!(cfg = ast_config_load2("logger.conf", "logger", config_flags)) || cfg == CONFIG_STATUS_FILEINVALID)) {
> Is there a reason that modifying the existing init_logger_chain is insufficient?
That's how I started out and that causes Asterisk to crash due to a deadlock. This was the best way I could get it to work. Currently, one issue I might anticipate is the custom levels take effect on restart, not reload.
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/e99624f7_4f7a2b55
PS3, Line 1897: }
> This leaks the configuration.
Done
File main/logger.c:
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/f0de39d5_c314c60e
PS4, Line 1898: ast_config_destroy(cfg);
> You can't call ast_config_destroy every time, as there are special return values from ast_config_loa […]
Sorry, forgot to send the reply - should show up now.
What would be the right way to free then so there is not a leak?
--
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: 4
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Thu, 29 Jul 2021 20:57:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210729/bbf9b3db/attachment.html>
More information about the asterisk-code-review
mailing list