Class LogFactory


public class LogFactory extends Object
This is a modified LogFactory that uses a simple ServiceLoader based discovery mechanism with a default of using JDK based logging. An implementation that uses the full Commons Logging discovery mechanism is available as part of the Tomcat extras download. Why? It is an attempt to strike a balance between simpler code (no discovery) and providing flexibility - particularly for those projects that embed Tomcat or some of Tomcat's components - is an alternative logging implementation is desired. Note that this implementation is not just a wrapper around JDK logging (like the original commons-logging impl). It adds 2 features - a simpler configuration (which is in fact a subset of and a formatter that is less ugly. The removal of 'abstract' preserves binary backward compatibility. It is possible to preserve the abstract - and introduce another (hardcoded) factory - but I see no benefit. Since this class is not intended to be extended - all protected methods are removed. This can be changed - but again, there is little value in keeping dead code. Just take a quick look at the removed code ( and it's complexity). -------------- Original comment:

Factory for creating Log instances, with discovery and configuration features similar to that employed by standard Java APIs such as JAXP.

IMPLEMENTATION NOTE - This implementation is heavily based on the SAXParserFactory and DocumentBuilderFactory implementations (corresponding to the JAXP pluggability APIs) found in Apache Xerces.

Craig R. McClanahan, Costin Manolache, Richard A. Sitze