-
1. Re: LogTransferListerer Loglevel
aslak May 2, 2012 4:13 AM (in response to suikast42)1 of 1 people found this helpfulsee info on how to configure java util logging here: http://www.java-tips.org/java-se-tips/java.util.logging/how-to-configure-a-logger-default-values-with-a-properties.html
-
2. Re: LogTransferListerer Loglevel
kpiwko May 2, 2012 4:14 AM (in response to suikast42)1 of 1 people found this helpfulHi Sueleyman,
you need to create a logging.properties file, where you'll change Log verbosity. You can see an example here:
https://github.com/shrinkwrap/resolver/blob/master/impl-maven/src/test/resources/logging.properties
If you are using Maven Surefire plugin, you additionally need to setup path to that file, an example being here:
https://github.com/shrinkwrap/resolver/blob/master/impl-maven/pom.xml#L382
Hope that helps,
Karel
-
3. Re: LogTransferListerer Loglevel
suikast42 May 2, 2012 5:24 AM (in response to kpiwko)Hi Guys,
thanks for help. I made a few little progress. So if I run the tests over surefire then the loglevel configuration will work.
But if I run over eclipse --> run as junit test then it won't work.
I create the logging.properties file in src/test/resources of my testproject.
Any ideas ??
-
4. Re: LogTransferListerer Loglevel
kpiwko May 2, 2012 6:27 AM (in response to suikast42)Set -Djava.util.logging.config.file=/path/to/file in VM arguments in "Run Configurations..." for your specific JUnit test.
-
5. Re: LogTransferListerer Loglevel
suikast42 May 2, 2012 6:44 AM (in response to kpiwko)Hi Karel,
I know this option. But I looked for a solution without setting a jvm flag. I found a logging.properties file in <JAVA_HOME>/jre/lib . It seems so that is the default log config file for java util logging.
The entry org.jboss.shrinkwrap.resolver.impl.maven.level=SEVERE in this propoperties file solve my problem. It's realy pity that java.util.logging doesn't support the log4j way to configure logging.
Thanks for help