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

0

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

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

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
0

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

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

\odl-controller\opendaylight\distribution\opendaylight\target\distribution.opendaylight-osgipackage\opendaylight\configuration

edit flag offensive delete publish link more
0

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

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

Follow
1 follower

Stats

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

Seen: 579 times

Last updated: May 27 '14