java.lang.Object
java.lang.Enum<Loglevel>
org.apache.torque.generator.configuration.controller.Loglevel
Alle implementierten Schnittstellen:
Serializable, Comparable<Loglevel>, java.lang.constant.Constable

public enum Loglevel extends Enum<Loglevel>
The possible log levels. This class uses by default log4j internally, but the logging framework can be exchanged using the setLoggingAdapter method. The public API of this class is agnostic of the logging framework.
  • Enum-Konstanten - Details

    • TRACE

      public static final Loglevel TRACE
      Loglevel trace.
    • DEBUG

      public static final Loglevel DEBUG
      Loglevel debug.
    • INFO

      public static final Loglevel INFO
      Loglevel info.
    • WARN

      public static final Loglevel WARN
      Loglevel warn.
    • ERROR

      public static final Loglevel ERROR
      Loglevel error.
  • Methodendetails

    • values

      public static Loglevel[] values()
      Gibt ein Array mit den Konstanten dieses Enum-Typs in der Reihenfolge ihrer Deklaration zurück.
      Gibt zurück:
      ein Array mit den Konstanten dieses Enumerationstyps in der Reihenfolge ihrer Deklaration
    • valueOf

      public static Loglevel valueOf(String name)
      Gibt die Enumerationskonstante dieses Typs mit dem angegebenen Namen zurück. Die Zeichenfolge muss exakt mit einer ID übereinstimmen, mit der eine Enumerationskonstante in diesem Typ deklariert wird. (Zusätzliche Leerzeichen sind nicht zulässig.)
      Parameter:
      name - Name der zurückzugebenden Enumerationskonstante.
      Gibt zurück:
      Enumerationskonstante mit dem angegebenen Namen
      Löst aus:
      IllegalArgumentException - wenn dieser Enumerationstyp keine Konstante mit dem angegebenen Namen enthält
      NullPointerException - wenn das Argument nicht angegeben wird
    • getKey

      public String getKey()
      Returns the key of the Loglevel.
      Gibt zurück:
      the key of the Loglevel, not null.
    • apply

      public void apply()
      Applies the log level.
    • getByKey

      public static Loglevel getByKey(String key)
      Returns the Loglevel for a given key.
      Parameter:
      key - the key to look for.
      Gibt zurück:
      the corresponding Loglevel, not null.
      Löst aus:
      IllegalArgumentException - if no Loglevel can be found for the key.
    • getCurrentLoglevel

      public static Loglevel getCurrentLoglevel()
      Returns the current loglevel.
      Gibt zurück:
      the current loglevel, or INFO if the current loglevel cannot be determined.
    • getLoggingAdapter

      public static LoggingAdapter getLoggingAdapter()
      Returns the currently used logging adapter.
      Gibt zurück:
      the current logging adapter, not null.
    • setLoggingAdapter

      public static void setLoggingAdapter(LoggingAdapter loggingAdapter)
      Sets the logging adapter.
      Parameter:
      loggingAdapter - the logging adapter
      Löst aus:
      NullPointerException - if loggingAdapter is null.