[slf4j-dev] [JIRA] (SLF4J-124) Add ability to log at a dynamic level

QOS.CH (JIRA) noreply-jira at qos.ch
Fri Jan 20 13:06:01 CET 2017


    [ https://jira.qos.ch/browse/SLF4J-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18065#comment-18065 ] 

Joern Huxhorn commented on SLF4J-124:
-------------------------------------

This issue is now nearly 8 years old.

If we wait just a little longer, we could use Java 8 default methods implemented on the {{Logger}} interface itself to fix it. That way it would "just work" for existing {{Logger}} implementations but they could still opt-in to override with different functionality.

I don't know the scope of slf4j 2.0 but if it would include lazy message generation using lambdas then that would require Java 8 anyway.

[End of Public Updates for Oracle JDK 7|http://www.oracle.com/technetwork/java/eol-135779.html] was reached 2015-04. Updates via paid Oracle Premier Support are still available, though.

> Add ability to log at a dynamic level
> -------------------------------------
>
>                 Key: SLF4J-124
>                 URL: https://jira.qos.ch/browse/SLF4J-124
>             Project: SLF4J
>          Issue Type: Sub-task
>          Components: Core API
>    Affects Versions: 1.5.x
>         Environment: Operating System: All
> Platform: All
> URL: http://stackoverflow.com/questions/2621701/setting-log-level-of-message-at-runtime-in-slf4j
>            Reporter: Robert Elliot
>            Assignee: SLF4J developers list
>         Attachments: Util.java.patch
>
>
> It is occasionally useful to have a log method that takes a level as a parameter.  The necessary methods can be added to the Util class without any compatibility issues as far as I can see - see attached patch.



--
This message was sent by Atlassian JIRA
(v6.4.12#64027)


More information about the slf4j-dev mailing list