Logging Level on Glassfish-3 JPA Eclipselink

六月ゝ 毕业季﹏ 提交于 2019-12-11 05:28:04

问题


How do I setup a EAR and a Glassfish Server that it shows FINE level on the development server but the same ear shows INFO level on the productive machines?

In the moment I change config in the persistence.xml every time i deploy onto the productive machines. But s.t. i forget and the machine starts flooding the log files.


回答1:


You must put in the

    <jvm-options>-Declipselink.logging.level=FINE</jvm-options>

into your config.xml java-config tag on your development machine.

And do NOT put in the logging level property into the persistence.xml.




回答2:


You can also set the EclipseLink log level using System properties (or you could set the log level in code using a SessionCustomizer).



来源:https://stackoverflow.com/questions/17047333/logging-level-on-glassfish-3-jpa-eclipselink

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!