[Asterisk-code-review] logger: Add custom logging capabilities (asterisk[master])
George Joseph
asteriskteam at digium.com
Tue Aug 24 09:32:01 CDT 2021
Attention is currently required from: N A, Joshua Colp.
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16222 )
Change subject: logger: Add custom logging capabilities
......................................................................
Patch Set 8: Code-Review-1
(9 comments)
File apps/app_verbose.c:
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/14d3c102_f7390f62
PS8, Line 65: , or
Extra ', or'
File configs/samples/logger.conf.sample:
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/36a5137e_905a05c3
PS8, Line 138: ;
Add <custom_level>
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/51ad5803_f6a3739d
PS8, Line 184:
Add:
; A log level defined in 'custom_levels' above
;important.log = important
File doc/CHANGES-staging/logger.txt:
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/b5ab2657_32adfbac
PS8, Line 3: Adds the ability for custom logging levels
: to be user-specified.
Added the ability to define custom log levels in logger.conf
and use them in the Verbose dialplan application.
File include/asterisk/logger.h:
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/6bb25550_e201127b
PS8, Line 338: ast_logger_dynamic_level
I'd make this more descriptive: ast_logger_get_dynamic_level.
File main/logger.c:
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/1bd3706f_e756b985
PS8, Line 820: logger_register_level(logfile);
init_logger_chain() also gets run whenever a "logger reload" or "logger rotate" command is run. This results in logger_register_level printing error messages every time one of those commands is run because the custom level was already registered. You'll need to keep track of the previous value of "custom_levels" and unregister them all before registering the new custom_levels.
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/dc6aabcf_282fe9ba
PS8, Line 2478: AST_RWLIST_UNLOCK(&logchannels);
You can't unlock here because you moved the LOCK out.
If you leave this here, a deadlock will result.
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/ad0d07c1_a5a21987
PS8, Line 2488: AST_RWLIST_UNLOCK(&logchannels);
Same
https://gerrit.asterisk.org/c/asterisk/+/16222/comment/bb6b15e5_fb73d01a
PS8, Line 2513: ast_logger_dynamic_level
ast_logger_get_dynamic_level
--
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: 8
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-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Tue, 24 Aug 2021 14:32:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210824/9ca6725c/attachment.html>
More information about the asterisk-code-review
mailing list