<p><a href="https://gerrit.osmocom.org/10116">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/10116/1/src/logging.c">File src/logging.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.osmocom.org/#/c/10116/1/src/logging.c@70">Patch Set #1, Line 70:</a> <code style="font-family:monospace,monospace">0</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Feel free to use 'LOGL_UNSET' here ;)</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Good catch, thanks.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10116/1/src/logging.c@721">Patch Set #1, Line 721:</a> <code style="font-family:monospace,monospace"> for (i = 0; i < osmo_log_info->num_cat; i++) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Would be great to have a comment here, what this loop […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">About what the loop does: yes, it resets all categories to unset.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Regarding your example: yes, it works like that.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I also thought about what you mentioned. I actually thought about calling it "logging level unset <loglevel>", which would basically apply to all unset categories. It would be the same as "all", but without forcing reset of the categories.<br>I even though about changing log_set_log_level() to contain a "bool reset" param, but since it's actually a public API we cannot do that. Looking at current users of log_set_log_level() through all osmocom projects, I think in general the desired behaviour is to reset the categories. I would then have another function to log_set_log_level2(struct log_target *target, int log_level, bool reset), and use the reset=false only in the case of "logging level unset <loglevel>" in VTY.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Agree?</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/10116/1/src/vty/logging_vty.c">File src/vty/logging_vty.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.osmocom.org/#/c/10116/1/src/vty/logging_vty.c@a283">Patch Set #1, Line 283:</a> <code style="font-family:monospace,monospace"></code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Probably, it makes sense to keep informing user that 'everything' is deprecated, but now is reused a […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I would expect "everything" to not be available anymore after this patch, so parsing should fail before this point.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/10116">change 10116</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/10116"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I0f50ad8d6fd038398f7d751287417505c8dcdeff </div>
<div style="display:none"> Gerrit-Change-Number: 10116 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 23 Jul 2018 13:53:15 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>