Could anybody please tell me
what’s the relation between log4j and apache.commons.logging ? which one is more popular and better ?
I have imported an existing Application in which they have imported import org.apache.commons.logging.LogFactory; and written a separate class called Log and overridden some of the methods as critical, warn, info
For instance
public static void info(String caller, String toWrite)
{
write(caller,toWrite,Log.INFO);
}
Could anybody please tell me is log4j and apache.commons.logging are different ??
Apache Commons Logging is an abstraction for the concrete implementation. It uses log4j, if present and configured. I would use Commons logging in my code and log4j as logging implementation.