I am using java logging in my classes.
Example:
public class MyClass {
private static Logger logger = Logger.getLogger(MyClass.class.getName());
....
}
When I am writing a JUnit Test for that class, I would like to set the Loglevel to 'FINE'. I tried:
@Before
public void setup() throws PluginException {
Logger.getGlobal().setLevel(Level.FINE);
....
}
But this has no effect. How can I control the loglevel in a JUnit Test when using Java Logging? I am running my tests using Maven.