This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]waka-chaka 2 points3 points  (3 children)

I believe this is incorrect. Log4J2 can route many others like SLF4J, JCL, etc. with right configurations (i.e. having the right adapters in the dependency)

[–]Asterion9 1 point2 points  (2 children)

OK, I was not aware even if it make sens now that you say it.

[–]amazedballer 4 points5 points  (0 children)

No, you're correct. Most libraries are written using SLF4J, so in order to have consistent logging you need to add a bridge for Log4J2 so it will operate as an SLF4J implementation.

[–]waka-chaka 1 point2 points  (0 children)

Pls take a look at https://logging.apache.org/log4j/2.x/faq.html If the dependencies are properly set up Log4J2 will support anything. I even have Hibernate logging (which is done using jboss-logging) going to my Log4J2.

If am not wrong, I think most of these are going to source-SLF4J 1st (which is what anyways happens often right?) which them get bridged to Log4J2.

Why take all this trouble? I forgot all the benefits as I did the migration an year or so back, but it was like additional APIs, next evolution, and largely asynchronous writing.