You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2018/12/31 11:57:32 UTC

[Bug 63046] New: Switch to SLF4J for logging

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: dev@poi.apache.org
          Reporter: fanningpj@yahoo.com
  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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63046] Switch to standard logging framework for logging

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

marius@volkhart.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
            Summary|Switch to SLF4J for logging |Switch to standard logging
                   |                            |framework for logging

--- Comment #4 from marius@volkhart.com ---
Discussions on the mailing list
https://lists.apache.org/thread.html/rdbddfbdfe492a266c1ee119a0cf08ae8211c3814e1ebc9b58bf7184f%40%3Cdev.poi.apache.org%3E
and
https://lists.apache.org/thread.html/r29e30c2ecd59c0e76a3d39ec5f1313db5d35cd15bd9ad83ff0b02e0f%40%3Cdev.poi.apache.org%3E
have led to use replacing the POILogger functionality with Log4j 2.

This change was made in
https://github.com/apache/poi/commit/259c9967efb354a0feff2a861ac8bd20582b6562

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63046] Switch to SLF4J for logging

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

--- Comment #2 from PJ Fanning <fa...@yahoo.com> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63046] Switch to SLF4J for logging

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

Javen O'Neal <on...@apache.org> changed:

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63046] Switch to SLF4J for logging

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

--- Comment #1 from Axel Howind <ax...@dua3.com> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63046] Switch to standard logging framework for logging

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

--- Comment #5 from marius@volkhart.com ---
Discussions on the mailing list
https://lists.apache.org/thread.html/rdbddfbdfe492a266c1ee119a0cf08ae8211c3814e1ebc9b58bf7184f%40%3Cdev.poi.apache.org%3E
and
https://lists.apache.org/thread.html/r29e30c2ecd59c0e76a3d39ec5f1313db5d35cd15bd9ad83ff0b02e0f%40%3Cdev.poi.apache.org%3E
have led to use replacing the POILogger functionality with Log4j 2.

This change was made in
https://github.com/apache/poi/commit/259c9967efb354a0feff2a861ac8bd20582b6562

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63046] Switch to SLF4J for logging

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

--- Comment #3 from Axel Howind <ax...@dua3.com> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63046] Switch to standard logging framework for logging

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

--- Comment #6 from PJ Fanning <fa...@yahoo.com> ---
this appears to be causing build problems in the java 16 build --
https://ci-builds.apache.org/job/POI/job/POI-DSL-1.16 -- other builds seem to
be ok

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63046] Switch to standard logging framework for logging

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63046

--- Comment #7 from marius@volkhart.com ---
Thanks, fixed in 1886811

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org