Specify logging.properties in embedded Glassfish with maven-embedded-glassfish-plugin

狂风中的少年 提交于 2019-12-12 18:51:19

问题


I use a project template containing a Maven configuration for an embedded Glassfish (using the maven-embedded-glassfish-plugin). I need to enable logging, but I do not even know which logging engine is enabled in the Glassfish (since I did not create the template).

The template uses slf4j-log4j12 as a dependency, but I am not sure if slf4j or java.util.logging does the actual logging. Therefore I created two logging files, one logging.properties and one log4j.properties and put them both to src/main/resources and /src/main/resources/META-INF, which both does not seem to work.

I added java.util.logging.config.file=logging.properties to the Maven Glassfish system properties (also for log4j), and also this did not work out. I checked, that the properties files are in the JAR file.

How can I determine which backend is responsible for logging?

How can I specify a logging configuration for embedded Glassfish using the Maven embedded Glassfish plugin?

Currently I get logging output at level INFO on default out. I guess this is the default setting.

来源:https://stackoverflow.com/questions/16335091/specify-logging-properties-in-embedded-glassfish-with-maven-embedded-glassfish-p

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