java - Define Hibernate SQL logging from log4j -
i use slf4j (with log4j binding) of projects' logging system. i'm rolling sleeves hibernate first time, , see 1 can enable/disable printing of sql statements (as executed hibernate) using following property in hibernate.cfg.xml
file:
<property name="show_sql">true</property>
is there way specify inside log4j config xml instead of inside hibernate config? i'd unify of logging settings 1 configuration file.
typically they're done setting following logger debug (via log4j.properties file). don't need change hibernate.cfg.xml
log4j.logger.org.hibernate.sql=debug
Comments
Post a Comment