Log to different file with log4cxx

后端 未结 4 1100
南笙
南笙 2021-01-18 19:22

I want to log to different files in my code.

How can i do that in Log4cxx with xml configuration or programatically in code...

  • Suppose that I have 1.k,
4条回答
  •  鱼传尺愫
    2021-01-18 19:27

    Create Each of the Loggers as normal, and then for each logger add a FileAppender set to the desired file via the Logger.addAppender() method.

提交回复
热议问题