Extra info messages from Struts appearing during Weblogic 12c startup

前端 未结 1 741
梦毁少年i
梦毁少年i 2021-01-14 23:25

I have a web application which is built using Struts2 (2.3.15.3) for MVC deployed on Oracle Weblogic 12c. The web app is working perfectly fine as is, just that when it is d

相关标签:
1条回答
  • 2021-01-14 23:39

    You can use xwork.loggerFactory system property to specify a custom logger factory to use with the Struts2 framework. By default it chooses commons logging or slf4j in the order they are presented. How to write a logger factory you can find here.

    For commons logging with log4j you can configure log4j configuration file, properties for example

    log4j.logger.org.apache=ERROR,Console
    log4j.logger.com.opensymphony.xwork2=ERROR,Console
    log4j.logger.com.opensymphony.xwork2.interceptor=ERROR
    log4j.logger.com.opensymphony.xwork2.ognl=ERROR
    log4j.logger.freemarker=ERROR,Console
    

    What appenders you use in my case is Console, but you can change this. The server should react on this immediately by suppressing INFO level.

    0 讨论(0)
提交回复
热议问题