Apache Commons Logging LogFactory.getLog() Method
How to use LogFactory.getLog() method to create a Log object in Apache Commons Logging API?
The simplest way to create a Log object is to call the static method LogFactory.getLog() and let the Apache Commons Logging API to decide which actual logging system to use.
For example, if you call LogFactory.getLog("MyLog"), Apache Commons Logging API will use the following rules to determine which logging system to use:
Rule 1. If commons-logging.properties file is specified in the class path and it has the org.apache.commons.logging.Log=SomeLoggerClass setting, SomeLoggerClass will be used as the logger.
Rule 2. Else if system property org.apache.commons.logging.Log=SomeLoggerClass is provided, SomeLoggerClass will be used as the logger.
Rule 3. Else if log4j.properties file is specified in the class path, org.apache.commons.logging.impl.Log4JLogger will be used as the logger.
Rule 4. Else if the running JVM is 1.4 or higher, org.apache.commons.logging.impl.Jdk14Logger will be used as the logger.
Rule 5. Else org.apache.commons.logging.impl.SimpleLog will be used as the logger.
2017-05-29, 1370👍, 0💬
What Is javaws.jar in JRE (Java Runtime Environment) 8? javaws.jar in JRE (Java Runtime Environment)...
How to download and install ojdbc7.jar for Oracle 12c R1? ojdbc8.jar for Oracle 12c R1 is a Java 7 a...
commons-lang3-3.8.1.jar is the JAR file for Apache Commons Lang 3.5, which provides a host of helper...
What Is ojdbc8.jar for Oracle 12c R2? ojdbc8.jar for Oracle 12c R2 is the JAR files of ojdbc.jar, JD...
Smack is an Open Source XMPP (Jabber) client library for instant messaging and presence. A pure Java...