[hibernate-dev] Should static logger classes be avoided

Sanne Grinovero sanne at hibernate.org
Wed Mar 27 10:10:32 EDT 2013

I would not avoid static loggers, there are better solutions like
making sure the "shared library" is loaded in the right classloader
(of the container).
AFAIK JBoss Modules do the right thing and BVal would be loaded in its
own module, making it reusable without drawbacks.

Creating logger instances on demand will use more CPU, keep more
memory busy, and just overall bloat the library.
Only viable alternative is to remove all logging :D


On 27 March 2013 14:02, Hardy Ferentschik <hardy at hibernate.org> wrote:
> Hi all,
> I would like to get some feedback regarding https://hibernate.atlassian.net/browse/HV-780 - "Use of static loggers prevent deployment as a shared library".
> Given that all Hibernate I think all Hibernate projects use static loggers I was wondering what everyone thinks.
> According to the issue having static loggers makes it hard/impossible to configure the log levels per application in case HV is used as a library.
> See also https://wiki.apache.org/commons/Logging/StaticLog and https://community.jboss.org/thread/222831?tstart=0
> --Hardy
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

More information about the hibernate-dev mailing list