Hi,
I've been looking for a way to differentiate the log output of multiple SessionFactory instances in a JBoss server.
More specifically; I have multiple SessionFactory instances bound to JNDI in a single JBoss server instance. I want to be able to set the log level to DEBUG for SessionFactory 1 and all the Session's built using it, but keep the log level as INFO for the rest (Keeping every mapped class in a single SessionFactory is not an option for my case).
However, looking at the code of SessionFactoryImpl, the logger is declared as:
private static final Log log = LogFactory.getLog(SessionFactoryImpl.class);
which uses a logger named after the class name. And declared final.
So, I assume all hibernate log output should use the same Logger, hence no ability to differentiate the output.
Is there any way to overcome this limitation ?
Thanks,
Bulent Erdemir
|