Class Logger.Levels

java.lang.Object
tripleplay.util.Logger.Levels
Enclosing class:
Logger

public static class Logger.Levels extends Object
Manages the target log levels for a given ident.
  • Constructor Details

    • Levels

      public Levels()
  • Method Details

    • setDefault

      public Logger.Levels setDefault(Logger.Level level)
      Configures the default log level. Messages with severity lower than this level will not be logged unless a specific level is set for their identifier.
    • set

      public Logger.Levels set(String ident, Logger.Level level)
      Configures the log level for messages with the supplied identifier. Messages with the supplied identifier with severity lower than this level will not be logged regardless of the default log level. Pass null to clear any level cutoff for ident.
    • set

      public Logger.Levels set(Logger logger, Logger.Level level)
      Configures the log level for messages from the supplied logger. Messages from the supplied logger with severity lower than this level will not be logged regardless of the default log level. Pass null to clear any level cutoff for logger.
    • defaultLevel

      public Logger.Level defaultLevel()
      Returns the current default log level.
    • level

      public Logger.Level level(String ident)
      Returns the current log level for the specified identifier, or null if no level is configured for that identifier.
    • shouldLog

      public boolean shouldLog(Logger.Level level, String ident)
      Returns true if a message with the specified level and ident should be logged.