Module org.snmp4j

Class LogLevel

java.lang.Object
org.snmp4j.log.LogLevel

public class LogLevel extends Object
  • Field Details

  • Constructor Details

    • LogLevel

      public LogLevel(int level)
    • LogLevel

      public LogLevel(String levelString)
  • Method Details

    • levelFromString

      public static int levelFromString(String levelString)
      Convert a level string "OFF", "ALL", "DEBUG", etc. into a level number.
      Parameters:
      levelString - one of the level strings "OFF", "ALL", "TRACE", "DEBUG", "INFO", "WARN", "INFO", "ERROR", and "FATAL".
      Returns:
      a number greater than zero if the level string could be converted into a level, zero otherwise.
    • toLevel

      public static LogLevel toLevel(String levelString)
      Returns a LogLevel object for the specified level string.
      Parameters:
      levelString - one of the level strings "OFF", "ALL", "TRACE", "DEBUG", "INFO", "WARN", "ERROR", and "FATAL".
      Returns:
      one of the LogLevel constants defined by this class or null if the supplied level string is not known.
      Since:
      1.7.2
    • getLevel

      public int getLevel()
    • toString

      public String toString()
      Overrides:
      toString in class Object