Advantage of log4j

后端 未结 8 2138
余生分开走
余生分开走 2021-02-13 18:57

What\'s the advantage of log4j over set System.out and System.err to output to a log file?

8条回答
  •  既然无缘
    2021-02-13 19:34

    Log4j offers the ability to rotate your log files based on size and delete them based on quantity (logrotate), so your servers don't fill up their disks. Personally I think that is one of the more valuable features in Log4j.

    Also Log4j is popular and understood by many developers. The last three companies I've worked at have all used Log4j in most projects.

提交回复
热议问题