Turn Off Apache Common Logging

前端 未结 4 594
抹茶落季
抹茶落季 2020-12-02 17:09

I am using Apache Common Logging library in my standalone application. After searching through the web, I try to turn off the logging by using

package javaap         


        
4条回答
  •  攒了一身酷
    2020-12-02 17:37

    As others pointed out, your log instance is instantiated before system property is set, which is too early.

    Try passing -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog to your JVM to make sure it is set at the right time.

提交回复
热议问题