<p>Pau Espin Pedrol <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/10116">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">logging: Fix logging level all<br><br>This commit fixes "logging level all <loglevel>" to have a behavior<br>which makes sense.<br><br>First, old "everything" loglevel is moved and re-used as<br>"unset", which can be used to set loglevel for a given category to<br>whatever the logtarget defaults to. This is done because it's handy to<br>have "unset" in pos 0 since it's the default level for all categories<br>until they are explicitly set. Furthermore, we don't care about<br>position/number of "everything" level because nowadays it's deprecated<br>and never assigned anymore (and it never had a public define value),<br>and string only kept for VTY compatibility until it is totally removed<br>in the future.<br><br>When using "logging level all", VTY sets default log level to <loglevel><br>and resets all log categories to UNSET. Then user can specify specific<br>log levels for specific categories using "logging level <cat> <loglevel>".<br><br>For instance:<br>log stderr<br> logging level all error<br> logging level l1p notice<br><br>Will print ERROR messages for all categories and NOTICE+ERROR messages<br>for L1P category.<br><br>Another example: In the VTY, while debugging:<br>* logging level all error  -> Only all ERRORs are printed<br>* logging level l1p debug -> all INFO+NOTICE+ERROR for L1P, and all ERROR are printed.<br>Now, user is interested to debug some other category, eg. TRX:<br>* logging level l1p unset -> L1P goes back to target default (ERROR)<br>* logging level trx debug -> we get all TRX logs.<br><br>Fixes: OS#3409<br>Change-Id: I0f50ad8d6fd038398f7d751287417505c8dcdeff<br>---<br>M include/osmocom/core/logging.h<br>M src/logging.c<br>M src/vty/logging_vty.c<br>3 files changed, 32 insertions(+), 11 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/16/10116/2</pre><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: newpatchset </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: 2 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>