Class Log4j2LogEventUtil
Note: Any changes in this code should, as far as possible, be reflected in the equivalently named log4j implementation. If the behaviour of this class starts to deviate from that of the log4j backend in any significant way, this difference should be called out clearly in the documentation.
This class was modified to add more log levels than the default ones. The levels used by FLogger do not all exist in
Log4j2, so we added them ourselves. This allows us to more finely control logging. Previously,
AbstractLogger.atFinest() and AbstractLogger.atFiner() would both log at the same level and so would
AbstractLogger.atFine() and AbstractLogger.atConfig(). Now, all four methods log at different levels.
Specifically, the following levels were added:
CustomLevel.FINER
(between CustomLevel.CONF
(between
Level.TRACE and Level.DEBUG)
Level.DEBUG and Level.INFO)
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.logging.log4j.LeveltoLog4jLevel(Level level) Converts java.util.logging.Level to org.apache.log4j.Level.
-
Method Details
-
toLog4jLevel
Converts java.util.logging.Level to org.apache.log4j.Level.This method was modified to add more log levels than the default ones.
CustomLevel.FINERandCustomLevel.CONFwere added. More information can be found in the documentation of this class.
-