Enabling logging in Spring

后端 未结 2 1088
无人及你
无人及你 2020-12-29 10:20

We are using RAD 7.5 as IDE and also log4j for logging purpose. we want to enable spring logging.

I tried the following

  • Added org.springframework
相关标签:
2条回答
  • 2020-12-29 10:54

    If you're using log4j2 using the common XML configuration format, add a Logger in your Loggers node:

    <Logger name="org.springframework" level="trace"/>
    

    Normally, the appenders used will be the ones attached to the Root entry.

    0 讨论(0)
  • 2020-12-29 11:19

    In your properties file you should have

    log4j.category.org.springframework=ALL
    

    not

    log4j.logger.org.springframework=ALL
    

    See this section in the Spring reference.

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