将自定义log4j级别从版本1.x迁移到2.0

时间:2013-02-13 22:30:18

标签: logging log4j log4j2

我们的应用程序(Spring MVC)使用log4j 1.4并具有自定义log4J级别(ALERT,它扩展了Level)。现在我们要迁移到log4j 2,如何将自定义ALERT级别迁移到log4j 2?。

documentationLoggerConfigs will be assigned a Log Level. The set of possible levels includes (TRACE, DEBUG, INFO, WARN, ERROR and FATAL). Note that in Log4j 2, the Level is an Enum and cannot be sub-classed. Users who desire more granularity are encouraged to use Markers instead.

我不确定Marker如何替换自定义Log4J级别。有什么想法吗?

0 个答案:

没有答案