Java Logger only to file, no screen output

前端 未结 5 1330
悲哀的现实
悲哀的现实 2021-02-19 12:44

I have quite a simple problem but can\'t find a solution for it. I have a logger with a file handler added, but it still spams the hell out of my console. How could I get the lo

5条回答
  •  囚心锁ツ
    2021-02-19 12:58

    Old question but to help other developers:

    You can also just use logger.setUseParentHandlers(false) on your logger.

提交回复
热议问题