我们的应用程序(Spring MVC)使用log4j 1.4并具有自定义log4J级别(ALERT,它扩展了Level)。现在我们要迁移到log4j 2,如何将自定义ALERT级别迁移到log4j 2?。
每documentation,LoggerConfigs 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级别。有什么想法吗?