Class Log4J2Configurator

java.lang.Object
nl.pim16aap2.util.logging.Log4J2Configurator

@NullMarked public final class Log4J2Configurator extends Object
Per-plugin Log4j2 configurator:

- plugin-specific RollingFile appender

- plugin-specific Console appender with [projectName] prefix

- additivity=false so nothing bubbles to root appenders

- dynamic level changes via VariableLevelFilter

  • Constructor Details

    • Log4J2Configurator

      public Log4J2Configurator(String projectName, String loggerNamePrefix)
  • Method Details

    • setMarkerName

      public static void setMarkerName(String name)
    • setLevel

      public void setLevel(org.apache.logging.log4j.Level level)
    • configure

      public void configure(Path logDir)
    • removeLoggers

      public void removeLoggers()
    • toLog4jLevel

      @Deprecated(forRemoval=true) public static org.apache.logging.log4j.Level toLog4jLevel(Level level)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use log4j2 levels directly.
      Converts a Level to a Level.
      Parameters:
      level - The level to convert.
      Returns:
      The converted level.