What Is commons-logging.properties File?

Q

What is commons-logging.properties file?

✍: FYIcenter.com

A

commons-logging.properties file allows you to control the behavior of the Apache Commons Logging API by using these simple rules:

  • Place commons-logging.properties file in the JVM class path.
  • The first entry should be org.apache.commons.logging.Log=SomeLoggerClass, which tells the API what logger class to use.
  • Place another properties file in the JVM class path for the above specified logger.

For example, you specify SimpleLog logger in commons-logging.properties file:

# commons-logging.properties
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog

And specify more settings simplelog.properties file:

# simplelog.properties
org.apache.commons.logging.simplelog.showdatetime=true

 

Using commons-logging.jar in Java Code

⇒⇒FAQ for Apache commons-logging.jar

2017-05-29, 375👍, 0💬