I am new in log4j. As I read on internet, child logger inherit parent logger settings. Usually examples are given are for two classes in same package. But what if the classes will be in different packages? For example
import com.foo.Bar;
public class MyApp{
static Logger logger = Logger.getLogger(MyApp.class);
public static void main(String[] args) {
BasicConfigurator.configure(); // default logging level is debug
Bar bar = new Bar();
bar.doIt();
}
}
and the second class in different package
package mypackage;
import org.apache.log4j.Logger;
public class Bar {
static Logger logger = Logger.getLogger(Bar.class);
public void doIt() {
logger.debug("Did it again!");
}
}
So what will be the level of logger in class Bar
?