[slf4j-user] Question: supporting ALL, OFF level

Matt Sicker boards at gmail.com
Thu Jan 27 20:39:52 CET 2022


It might be beneficial to support the equivalent of levels by
interpreting them as integral values. log4j-api supports custom log
levels, and those all work due to levels having an integral value to
compare them against each other. From a Logger API perspective, it
doesn't really make sense to log messages at OFF or ALL, especially as
they tend to do the opposite of their name (e.g., logging at the OFF
level means "always log" as OFF is a higher level than FATAL, while
logging at the ALL level means it never gets logged as ALL is lower
than TRACE).

On Thu, Jan 27, 2022 at 9:57 AM Joakim Erdfelt <joakim.erdfelt at gmail.com> wrote:
>
> While slf4j is just a facade, there's a growing group of features in various projects that put configuration at the slf4j api level (both at startup and runtime), not at the slf4j implementation level.
>
> Am I wrong in assuming that the stated scope of this was for this proposal to have slf4j api level ability?
>
> - Joakim
>
> On Thu, Jan 27, 2022 at 8:42 AM Ceki Gülcü <ceki at qos.ch> wrote:
>>
>>
>>
>> On 1/27/2022 2:55 PM, Joakim Erdfelt wrote:
>> > 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.
>>
>> Unless I am forgetting something or getting forgetful, SLF4J does not
>> allow users to set levels.
>>
>> > - Joakim
>>
>> --
>> Ceki Gülcü
>>
>> Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
>> _______________________________________________
>> slf4j-user mailing list
>> slf4j-user at qos.ch
>> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user


More information about the slf4j-user mailing list