As Sanne mentionned in the private email, I had reasons to use non
I was basically following the "recommendations" made by slf4j
Now, they changed their recommendations to a "not sure" approach and I
look like a clown :o)
Consistency is better in this case. If Core does not aim at using non
static loggers, we can fall back to static loggers. Steve?
Hibernate Search in Action (http://is.gd/Dl1
On Oct 16, 2008, at 06:17, Hardy Ferentschik wrote:
I just wanted to get some opinion on logger creation.
I introduced a LoggerFactory class into Hibernate Search which
allows the creation of Logger instances without having to specify
the class. The idea behind this it coming from this article -
However, as Sanne pointed out to me, to use this pattern efficiently
one has to declare the loggers as static. In fact I am so used to
this idiom that I even dit not notice that in Search the loggers are
declared as instance variables.
After looking around a little I found these articles:
Seems there are pro and cons for both approaches. The biggest
drawback of the static approach being the case where the jar is
deployed as shared library which can screw up the log output of the
using applications (even thought there seems to be ways around this).
Now, Hibernate Core seems to use static loggers. Does this mean we
are not concered about the potential drawbacks of this approach?
Should we aim for a consistent usage pattern, even across the
different Hibernate projects? Or do we maybe already have such
hibernate-dev mailing list