1

I uses Log4j 1.2.15 & 1.2.17 for a long time. But since its DailyRollingFileAppender option got bug that cause log won't rolls sometimes in 1.2, so I'm trying to immigrating to Log4j2.

Since I got no exp on Log4j2, so things don't goes smooth. I put my log4j2.xml under /WEB-INF and added following lines into web.xml in my Eclipse.

    ...
    <context-param>
        <param-name>log4jConfiguration</param-name>
        <param-value>/WEB-INF/log4j2.xml</param-value>
    </context-param>
</web-app>

Then I export my project into WAR, and deploy it on Websphere. It show me an error.

[2017/6/8   14:00:15:702 CST] 000000c4 SystemErr     R ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.

Did I do something wrong?

JimHawkins
  • 4,843
  • 8
  • 35
  • 55
user6309529
  • 153
  • 1
  • 3
  • 16

1 Answers1

1

Please check this question here

If you are using Maven in your project, consider the answer by stivlo in that question, and place your config file under src/main/resources.

D00de
  • 880
  • 3
  • 7
  • 26