
http://bugzilla.slf4j.org/show_bug.cgi?id=163 --- Comment #7 from Joern Huxhorn <joern@huxhorn.de> 2009-12-11 10:22:59 --- --- file A.java import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class A { void foo() { Logger logger = LoggerFactory.getLogger(A.class); logger.info("foo"); } } -- file B.java import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class B extends A { void bar() { Logger logger = LoggerFactory.getLogger(B.class); logger.info("bar"); } } would print 2009-12-11 08:44:22,145 INFO [main] [] A - foo 2009-12-11 08:44:22,160 INFO [main] [] A - foo 2009-12-11 08:44:22,160 INFO [main] [] B - bar instead. This is, in my opinion, better style as the code that prints "foo" is actually located in A, not B. Neither technique is wrong I just think that the result of using XYZ.class is more intuitive. Wow, you nearly had me there, I'm also in need of coffee! -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.