0

Our application (Spring MVC) uses log4j 1.4 and has a custom log4J level (ALERT which extends Level). Now that we are migrating to log4j 2, how can I migrate the custom ALERT level to log4j 2?.

Per 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.

I am not sure how a Marker can replace a custom Log4J level. Any thoughts?

4

0 回答 0