I like it. OFF is definitely useful, and should be there.
ALL on the other hand seems redundant. Just setting the most noisy level (TRACE in slf4j terms) would be the equivalent end result. - Joakim On Thu, Jan 27, 2022 at 7:37 AM Dongjin Lee <dong...@apache.org> wrote: > Hi, slf4j community, > > I have a question on slf4j-api's Level definition. > > As far as I know, the slf4j community is planning to support the dynamic > logging level change feature with https://jira.qos.ch/browse/SLF4J-124. > 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. > > > https://github.com/qos-ch/slf4j/blob/master/slf4j-api/src/main/java/org/slf4j/event/EventConstants.java > > For example, logback supports seven levels (i.e., five common ones + ALL, > OFF): > > > https://github.com/qos-ch/logback/blob/master/logback-classic/src/main/java/ch/qos/logback/classic/Level.java > > Log4j supports 8 levels (i.e., five common ones + FATAL, ALL, OFF): > > > https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Level.html > > Java's official logging level definition is a little bit different, but > they also support ALL, OFF: > > https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html > > 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? > > If you agree and open an issue, I am willing to contribute. > > Best, > Dongjin > > -- > > Dongjin Lee > > A hitchhiker in the mathematical world. > > github: github.com/dongjinleekr > keybase: https://keybase.io/dongjinleekr > linkedin: kr.linkedin.com/in/dongjinleekr > speakerdeck: speakerdeck.com/dongjin > _______________________________________________ > slf4j-user mailing list > slf4j-user@qos.ch > http://mailman.qos.ch/mailman/listinfo/slf4j-user
_______________________________________________ slf4j-user mailing list slf4j-user@qos.ch http://mailman.qos.ch/mailman/listinfo/slf4j-user