Redirect System.out.println to log

前端 未结 5 1404
孤城傲影
孤城傲影 2021-01-11 15:51

In my project test suite there is big usage of

System.out.println 

I\'m trying to redirect these output to log file (through configuration

5条回答
  •  轮回少年
    2021-01-11 16:46

    My suggestion would be to refactor if possible. For a possible solution, check these similar questions

    log4j redirect stdout to DailyRollingFileAppender

    Redirect System.out.println to Log4J, while keeping class name information

提交回复
热议问题