-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Why JBoss logging?
PostPosted: Thu Apr 02, 2015 12:07 pm 
Newbie

Joined: Fri Nov 07, 2014 1:17 pm
Posts: 3
I understand that Hibernate 3.x used SLF4J but Hibernate 4.x switched to JBoss Logging.

I am writing because I do not understand this change. My company uses SLF4J in most of our apps, and it works great: you can just plug in whatever implementation you like. Logging is useful, but simple, and SLF4J is a simple, versatile solution.

JBoss Logging, on the other hand, has caused us many headaches. Our app is using SLF4J directed to Log4j 2.x, but Hibernate is sending its logs to java.util.logging! It seems JBoss logging only uses SLF4J if Logback is on the classpath (unsure why) and this particular version of JBoss Logging doesn't seem to detect Log4j 2.x.

I think the issue is more than just some quirks in JBoss Logging's implementation. The whole concept of trying to support any logging backend with this auto-detection mechanism is, in the end, inferior to SLF4J's architecture. It means to support a new backend, changes have to be made to JBoss Logging. With SLF4J, however, any logging vendor can provide their own compliant SLF4J backend. (See log4j 2.x's SLf4J Bridge[1] for example.)

When a great logging API, SLF4J, already exists, why use JBoss Logging? Hibernate is great, but I believe this one aspect of Hibernate is detrimental to its users.

[1] http://logging.apache.org/log4j/2.x/maven-artifacts.html#SLF4J_Bridge


Top
 Profile  
 
 Post subject: Re: Why JBoss logging?
PostPosted: Tue Apr 07, 2015 4:34 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
Hi,

you can find an explanation in the documentation (http://docs.jboss.org/hibernate/orm/5.0/topical/html/logging/Logging.html):

Quote:
JBoss Logging was chosen because of its i18n support and its support for "message ids"


Maybe you are experiencing a known bug: https://issues.jboss.org/browse/JBLOGGING-112

Hope this help,
Davide


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.