Is it possible to put all output from show_sql in

2019-06-18 22:58发布

When developing or running a spring mvc app locally that uses hibernate, it would be nice if I could get the output of all sql to a separate file.

Is this possible?

I know there is a hibernate property show_sql but I believe that will just get jumbled together with all other log4j logging info, correct?

1条回答
Root(大扎)
2楼-- · 2019-06-18 23:46

Set the org.hibernate.SQL category to DEBUG and use a specific appender for it.

See also

查看更多
登录 后发表回答