<p> Attention is currently required from: N A. </p>
<p>Patch set 5:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16222">View Change</a></p><p>7 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File configs/samples/logger.conf.sample:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16222/comment/e693c24d_f5b59c08">Patch Set #5, Line 89:</a> <code style="font-family:monospace,monospace">; be sent to logging channels. The maximum number of dynamic</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Dynamic levels is an internal concept that a user may not know. It's best to use the same language here, for example:</p><p style="white-space: pre-wrap; word-wrap: break-word;">The maximum number of custom logging levels is 16, but not all of these may be available if modules in Asterisk define their own.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File doc/CHANGES-staging/logger.txt:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16222/comment/d891d330_c73b234e">Patch Set #5, Line 3:</a> <code style="font-family:monospace,monospace">Adds the ability for custom dynamic logging</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Stick to custom logging levels.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File include/asterisk/logger.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16222/comment/fbb83fe2_1ced940c">Patch Set #5, Line 336:</a> <code style="font-family:monospace,monospace"> * \retval non-zero negative to be used with ast_log_dynamic_level for sending messages to this level</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't understand this, non-zero negative? What happens with zero? -1 is a non-zero negative as well</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16222/comment/d96a6663_7ec9f704">Patch Set #5, Line 338:</a> <code style="font-family:monospace,monospace">int ast_dynamic_logger_level(const char *name);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This should be ast_logger_dynamic_level to match the API naming scheme already present.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File main/logger.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16222/comment/4a066d44_803b71be">Patch Set #5, Line 819:</a> <code style="font-family:monospace,monospace">                   char *customlog = ast_strdup(logfile);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Why does this need to be duplicated? logger_register_level internally duplicates and stores it. Right now this will cause a leak of customlog.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16222/comment/36855785_a5be9db9">Patch Set #5, Line 2505:</a> <code style="font-family:monospace,monospace">        unsigned int available = 0;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You've defined this as an unsigned int, but logger_register_level returns an int.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16222/comment/b0e32768_b9d41f94">Patch Set #5, Line 2519:</a> <code style="font-family:monospace,monospace">    AST_RWLIST_WRLOCK(&logchannels);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This can be a RDLOCK as it is only reading.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16222">change 16222</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/16222"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If082703cf81a436ae5a565c75225fa8c0554b702 </div>
<div style="display:none"> Gerrit-Change-Number: 16222 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 05 Aug 2021 11:59:42 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>