<div dir="ltr">Hi all,<br><br>A discussion was started during the review of <a href="https://gerrit.osmocom.org/10116/">https://gerrit.osmocom.org/10116/</a>.<br>The main idea of this change is to fix the behaviour of 'logging level all LEVEL',<br>but I think it was also mixed with some additional feature, which I would like<br>to discuss here, publicly.<br><br>First of all, the change introduces a new special logging level 'unset',<br>which allows one to reset a given category (i.e. unset its custom value):<br><br> !! Initial logging configuration:<br> logging level all error<br> logging level mncc debug<br> logging level pag notice<br> logging level meas debug<br><br> !! Resetting DMNCC:<br> # logging level mncc unset<br><br> !! So, now DMNCC has no custom log level, it will use<br> !! the default level (in this example it is 'error'):<br> logging level all error<br> logging level pag notice<br> logging level meas debug<br><br>This feature looks fine and extremely useful for me.<br><br>But (among fixing) this change additionally changes the behaviour<br>of a command for setting the default logging category (i.e. 'logging<br>level all LEVEL'):<br><br> !! Initial logging configuration:<br> logging level all error<br> logging level mncc debug<br> logging level pag notice<br> logging level meas debug<br><br> !! Changing the default logging level:<br> # logging level all debug<br><br> !! Ahhh, I've lost my custom levels :(<br> logging level all debug<br><br> !! What I expected to get:<br> logging level all debug<br> logging level mncc debug<br> logging level pag notice<br> logging level meas debug<br><br>So, together with changing the default logging category,<br>this command now would also reset all custom settings...<br><br>I am not sure this is exactly what one need/expect, so<br>I would like to share the following ideas:<br><br> 1) The category 'all' looks/sounds confusing when it's used<br> in such cases like this:<br><br> # logging level all debug<br><br> because one can interpret it like:<br><br> "set all categories to debug".<br><br> despite actually (according to the implementation) this<br> is related to the default logging policy.<br><br> Maybe, we should rename it to 'default'?<br><br> So, 'logging level all LEVEL' would *set all categories*<br> to a given logging LEVEL, while 'logging level default LEVEL'<br> would only affect the default logging level...<br><br> 2) Introducing the new command:<br><br> # logging level unset LEVEL<br><br> which is intended to assign a given LEVEL to all categories,<br><div> which have no custom logging level (i.e. have 'unset'), would</div><div> make the idea of having default logging policy meaningless.</div><div><br></div><div> Setting logging level(s) for all possible categories (using this</div><div> command), looks like writing iptables rules for all possible</div><div> and impossible cases instead of using the DEFAULT policy...<br></div><br> 3) The introduced behaviour of resetting all categories to 'unset'<br> could be implemented in a separate function, and can be<br> represented by a separate command:<br><br> # logging level unset-all<br><br><div> The name of this command clearly defines the expected behaviour.</div><div> Moreover, it doesn't affect the default logging level, which can be</div><div> still changed by a separate command.<br></div><br>As we (me and Pau) have different opinions, or we simply don't<br>understand each other, let's make this discussion public, and<br>let's see what others think about this...<br><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>With best regards,<br></div><div>Vadim Yanitskiy.<br></div></div></div></div></div></div>
</div>