How to control Hibernate's logging?
I have a hibernate that is configured only programmatically ( I don't have a single XML file ).
I just finished writing my own implementation of org.slf4j.Logger.
How ca开发者_高级运维n I force hibernate to log to my implementation instead of the default one?AFAIK you can't just change hibernates logging behaviour, but you can get slf4j to use your source with slf4j 'Bridging legacy APIs'
Ok if you re-implemented a slf4j logger, you are using the slf4j-api right ? if you are using Maven you could alter the dependencies for your project (see e.g. hibernate slf4j dependencies) to use your implementation jar instead
精彩评论