Can I find out what is the best practice for using org.apache.commons.logging.LogFactory.getLog?
For me, I use it as follows:
public class A { private static final Log log = LogFactory.getLog(A.class); } public class B { private static final Log log = LogFactory.getLog(B.class); }
So, if I have 100 classes, will 100 static log objects be created?
Or is it better to do it this way?
public class A { private static final Log log = LogFactory.getLog(Main.class); } public class B { private static final Log log = LogFactory.getLog(Main.class); }
Do all 100 classes belong to the same journal?
Thanks.
source share