How to log stdout output in Tomcat?

前端 未结 3 1984
粉色の甜心
粉色の甜心 2020-12-29 06:04

Is there a way to log all stdout output to the catalina.log file in Tomcat? (i.e. everything that gets printed to System.out.println())

The console wind

3条回答
  •  执念已碎
    2020-12-29 06:27

    Did you checked, whether the log4j.properties file can be found from your application? Maybe you can check, by setting a hardcoded file path like

    -Dlog4j.configuration=file:///C:\Dev\log4j.properties

    If the logs are written after these change, the relativ path to the log4j file is wrong.

提交回复
热议问题