iliaden
iliaden

Reputation: 3889

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 can I force hibernate to log to my implementation instead of the default one?

Upvotes: 4

Views: 465

Answers (1)

Michael Pralow
Michael Pralow

Reputation: 6630

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

Upvotes: 1

Related Questions