public enum Verbose extends java.lang.Enum<Verbose>
Example:
Verbose.info("Code reached"); try { Thread.sleep(1000); Verbose.warning(MyClass.class, "function", "Warning level here"); Verbose.critical(MyClass.class, "function", "Critical level here"); } catch (final InterruptedException exception) { Thread.currentThread().interrupt(); Verbose.exception(MyClass.class, "function", exception); }
Enum Constant and Description |
---|
CRITICAL
Information, warning and critical messages.
|
INFORMATION
Only information messages.
|
NONE
Verbose disabled.
|
WARNING
Information and warning messages.
|
Modifier and Type | Method and Description |
---|---|
static void |
critical(java.lang.Class<?> clazz,
java.lang.String function,
java.lang.String... message)
Display a critical verbose message to error output.
|
static void |
exception(java.lang.Class<?> clazz,
java.lang.String function,
java.lang.Throwable thrown,
java.lang.String... message)
Display a critical verbose message to error output.
|
static void |
info(java.lang.String... message)
Display an informative verbose message to standard output.
|
static Verbose |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Verbose[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static void |
warning(java.lang.Class<?> clazz,
java.lang.String function,
java.lang.String... message)
Display a check verbose message to error output.
|
public static final Verbose NONE
public static final Verbose INFORMATION
public static final Verbose WARNING
public static final Verbose CRITICAL
public static Verbose[] values()
for (Verbose c : Verbose.values()) System.out.println(c);
public static Verbose valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static void info(java.lang.String... message)
message
- The list of messages.public static void warning(java.lang.Class<?> clazz, java.lang.String function, java.lang.String... message)
clazz
- The current class name.function
- The current function name.message
- The list of messages.public static void critical(java.lang.Class<?> clazz, java.lang.String function, java.lang.String... message)
clazz
- The current class name.function
- The current function name.message
- The list of messages.public static void exception(java.lang.Class<?> clazz, java.lang.String function, java.lang.Throwable thrown, java.lang.String... message)
clazz
- The current class name.function
- The current function name.thrown
- The thrown exception.message
- The list of messages.