<div dir="ltr">I like it.<div><br></div><div>OFF is definitely useful, and should be there.</div><div><br></div><div>ALL on the other hand seems redundant.</div><div>Just setting the most noisy level (TRACE in slf4j terms) would be the equivalent end result.</div><div><br></div><div>- Joakim</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 27, 2022 at 7:37 AM Dongjin Lee <<a href="mailto:dongjin@apache.org">dongjin@apache.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi, slf4j community,</div><div><br></div><div>I have a question on slf4j-api's Level definition.</div><div><br></div><div>As far as I know, the slf4j community is planning to support the dynamic logging level change feature with <a href="https://jira.qos.ch/browse/SLF4J-124" target="_blank">https://jira.qos.ch/browse/SLF4J-124</a>. However, since slf4j-api only defines five levels, omitting `ALL` and `OFF` (below), we can't call a method like `logger.setLevel(Level.OFF)` - which is available in other logging frameworks.</div><div><br></div><div><a href="https://github.com/qos-ch/slf4j/blob/master/slf4j-api/src/main/java/org/slf4j/event/EventConstants.java" target="_blank">https://github.com/qos-ch/slf4j/blob/master/slf4j-api/src/main/java/org/slf4j/event/EventConstants.java</a></div><div><br></div><div>For example, logback supports seven levels (i.e., five common ones + ALL, OFF):</div><div><br></div><div><a href="https://github.com/qos-ch/logback/blob/master/logback-classic/src/main/java/ch/qos/logback/classic/Level.java" target="_blank">https://github.com/qos-ch/logback/blob/master/logback-classic/src/main/java/ch/qos/logback/classic/Level.java</a></div><div><br></div><div>Log4j supports 8 levels (i.e., five common ones + FATAL, ALL, OFF):</div><div><br></div><div><a href="https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Level.html" target="_blank">https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Level.html</a></div><div><br></div><div>Java's official logging level definition is a little bit different, but they also support ALL, OFF:</div><div><br></div><div><a href="https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html" target="_blank">https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html</a></div><div><br></div><div>So, in my humble opinion, to make the dynamic logging level change feature more complete, slf4j-api is much better to support ALL and OFF levels. What do you think?</div><div><br></div><div>If you agree and open an issue, I am willing to contribute.</div><div><br></div><div>Best,</div><div>Dongjin</div><div><br></div><div>--</div><div><br></div><div>Dongjin Lee</div><div><br></div><div>A hitchhiker in the mathematical world.</div><div><br></div><div>github: <a href="http://github.com/dongjinleekr" target="_blank">github.com/dongjinleekr</a></div><div>keybase: <a href="https://keybase.io/dongjinleekr" target="_blank">https://keybase.io/dongjinleekr</a></div><div>linkedin: <a href="http://kr.linkedin.com/in/dongjinleekr" target="_blank">kr.linkedin.com/in/dongjinleekr</a></div><div>speakerdeck: <a href="http://speakerdeck.com/dongjin" target="_blank">speakerdeck.com/dongjin</a></div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><i></i></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch" target="_blank">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a></blockquote></div>