[Bug 63046] New: Switch to SLF4J for logging

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 63046] New: Switch to SLF4J for logging

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

            Bug ID: 63046
           Summary: Switch to SLF4J for logging
           Product: POI
           Version: 4.0.x-dev
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Allows POI users more control over how they want to log.

Probably a pretty big task.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63046] Switch to SLF4J for logging

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

Javen O'Neal <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63046] Switch to SLF4J for logging

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

--- Comment #1 from Axel Howind <[hidden email]> ---
Why not use log4j2 instead which now offers the same functionality that SLF4J
does (seperation of API and backend), seems to perform better and has more
functionality? What's more, it's an Apache project.

There's an interesting discussion on stackoverflow in the comments to
[this](https://stackoverflow.com/questions/41498021/is-it-worth-to-use-slf4j-with-log4j2)
question, where one of the log4j2 devs and Ceki (the one behind SLF4J) are
involved. Oh, and of course the answer by itself is also worth a read.

After trying both, I would say: if your project already uses SLF4J, stick with
it. If not, use Log4j2.

What's more: SLF4J on Android is dead for more than 4 years now. I don't know
how easy it is running POI on Android (I just googled and found at least two
projects that do it), but it would be definitely easier if the used logging
framework supports the platform.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63046] Switch to SLF4J for logging

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

--- Comment #2 from PJ Fanning <[hidden email]> ---
https://logging.apache.org/log4j/2.x/

Says:

Avoid lock-in
Applications coded to the Log4j 2 API always have the option to use any
SLF4J-compliant library as their logger implementation with the log4j-to-slf4j
adapter.

My preference would still be for slf4j-api. And users who want log4j2 can use
https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl/2.11.1

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63046] Switch to SLF4J for logging

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

--- Comment #3 from Axel Howind <[hidden email]> ---
I think technical there's not much difference between SLF4J and Log4j2
regarding lock-in. Both separate API and Implementation (which was not the case
with the old log4j) and can be used with different backends. You can use log4j2
and log to any SLF4J backend or vice-versa.

But honestly, there doesn't seem to be much life left in SLF4J. The last
check-in is from march 2018. Just have a look at the repo and the dev list.
Same goes for logback (same dev).

SLF4J now already lacks features that the JDK Logger introduced in JDK 8
(message suppliers to prevent creating temporary objects being an example). The
SLF4J feature request dates from 2016, and it doesn't seem there will be much
happening anytime soon.

Maybe it would be worth reaching out to Ceki/qos and ask if SLF4J is still
alive before deciding.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]