Instead of specifying the class name on each class:
log = Logger.getLogger(Foo.class);
log = Logger.getLogger(Bar.class);
log = Logger.getLogger(Test.class);
Will it be OK to use :
log = Logger.getLogger(this.getClass());
What will be the implications?
If you create a subclass, the log messages will get logged to the subclass’s logger.
.
.
In the above example, “Doing something” will get logged to the pkgtwo.SubType logger instead of pkgone.SuperType logger, which may or may not be what you want.