Advantage of log4j

后端 未结 8 2154
余生分开走
余生分开走 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:49

    log4j allows you to log to various resources e.g. event log, email, file system etc while allowing your application to remain decoupled from all of these resources. Furthermore, you get to use a common interface to log to all of the various resources without having to learn or integrate thier corresponding APIs.

提交回复
热议问题