Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


How can I change the log level of a bundle when running a JUnit test under Eclipse?

asked 2014-05-27 04:46:45 -0700

In order to debug a test, I would like to be able to see TRACE or DEBUG log messages of a particular bundle. This is easily done from the OSGi console when running the controller normally (not tests) by using

setLogLevel org.opendaylight.bundlename TRACE

How can achieve the same effect from Eclipse, when running a JUnit test, or even when running tests with Maven from the console?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-05-27 07:48:15 -0700

How about setting the log level in logback.xml located at following location:


edit flag offensive delete publish link more

answered 2014-05-27 08:17:02 -0700

Tony Tkacik gravatar image

Depends on implementation of slf4j used when running JUnit tests, usually one used is slfj4-simple whichI believe do not support trace and configuration of loggers. You may eant yo use logback and proper logback.xml for your tests.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-05-27 04:46:45 -0700

Seen: 1,014 times

Last updated: May 27 '14