Enum Loglevel
- Alle implementierten Schnittstellen:
Serializable
,Comparable<Loglevel>
,java.lang.constant.Constable
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.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum-Konstanten - Übersicht
Enum-Konstanten -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
apply()
Applies the log level.static Loglevel
Returns the Loglevel for a given key.static Loglevel
Returns the current loglevel.getKey()
Returns the key of the Loglevel.static LoggingAdapter
Returns the currently used logging adapter.static void
setLoggingAdapter
(LoggingAdapter loggingAdapter) Sets the logging adapter.static Loglevel
Gibt die Enumerationskonstante dieses Typs mit dem angegebenen Namen zurück.static Loglevel[]
values()
Gibt ein Array mit den Konstanten dieses Enum-Typs in der Reihenfolge ihrer Deklaration zurück.
-
Enum-Konstanten - Details
-
TRACE
Loglevel trace. -
DEBUG
Loglevel debug. -
INFO
Loglevel info. -
WARN
Loglevel warn. -
ERROR
Loglevel error.
-
-
Methodendetails
-
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
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ältNullPointerException
- wenn das Argument nicht angegeben wird
-
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
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
Returns the current loglevel.- Gibt zurück:
- the current loglevel, or INFO if the current loglevel cannot be determined.
-
getLoggingAdapter
Returns the currently used logging adapter.- Gibt zurück:
- the current logging adapter, not null.
-
setLoggingAdapter
Sets the logging adapter.- Parameter:
loggingAdapter
- the logging adapter- Löst aus:
NullPointerException
- if loggingAdapter is null.
-