Skip to content

Instantly share code, notes, and snippets.

@NoUsername
Created November 9, 2016 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NoUsername/a56eeaafc1a8947c6e3cce8a14cd0fa9 to your computer and use it in GitHub Desktop.
Save NoUsername/a56eeaafc1a8947c6e3cce8a14cd0fa9 to your computer and use it in GitHub Desktop.
small snippet of code that you can quikly run in the debugger or drop into a test-file to activate hibernate logging without futzing with project/environment
((ch.qos.logback.classic.Logger)org.slf4j.LoggerFactory.getLogger("org.hibernate.SQL")).setLevel(ch.qos.logback.classic.Level.DEBUG);
((ch.qos.logback.classic.Logger)org.slf4j.LoggerFactory.getLogger("org.hibernate.type")).setLevel(ch.qos.logback.classic.Level.TRACE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment