开发者

hibernate SQL sentences over writing catalina.out. File getting out of control !

UPDATE: The answer for this question is in the comments of Martins answer

I have a this application on hibernate+spring installed on differents clients for one server. Just found out 开发者_StackOverflow中文版that they were compiled with the Hibernate - show_sql = true, and every time my app gets a hit it fills the catalina.out with hql. my catalina.out file is growing a lot. I need to turn this show_sql without stoping the server on production. Can this be done ?

My file is getting really big, i dont want to compile every application (have different releases by cliente), stop the server, upload, and restart.

Thank you!


There are a number of things not perfectly clear from that question so I'll hazard a guess. You seem to be using Tomcat since you're talking about catalina.out. That means your webapps should be extracted in a webapps directory somewhere. That means you should be able to find persistence.xml or hibernate-something.xml that holds your hibernate configuration. In that file you should have a <propery name="hibernate.show_sql" value="true"/> or simply <propery name="show_sql" value="true"/>.

You can edit this file and change the value to false, but since it's likely to be cached it will only take effect after you restart your web-apps. You could do this one at a time for the affected apps or restart your tomcat service which would likely be a bit more disruptive.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜