public enum Verbose extends Enum<Verbose>
Example:
Verbose.set(Verbose.INFORMATION, Verbose.WARNING, Verbose.CRITICAL); 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); }
This class is Thread-Safe.
Enum Constant and Description |
---|
CRITICAL
Only critical and exceptions messages.
|
INFORMATION
Only information messages.
|
WARNING
Only warning messages.
|
Modifier and Type | Method and Description |
---|---|
static void |
critical(Class<?> clazz,
String function,
String... message)
Display a critical verbose message to error output.
|
static void |
exception(Throwable exception,
String... message)
Display a critical verbose message to error output.
|
static void |
info(String... message)
Display an informative verbose message to standard output.
|
static void |
set(Verbose... verboses)
Set the verbosity level.
|
static Verbose |
valueOf(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(Class<?> clazz,
String function,
String... message)
Display a check verbose message to error output.
|
static void |
warning(String... message)
Display a check verbose message to error output.
|
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(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static void info(String... message)
message
- The list of messages.INFORMATION
public static void warning(String... message)
message
- The list of messages.WARNING
public static void warning(Class<?> clazz, String function, String... message)
clazz
- The current class name.function
- The current function name.message
- The list of messages.WARNING
public static void critical(Class<?> clazz, String function, String... message)
clazz
- The current class name.function
- The current function name.message
- The list of messages.CRITICAL
public static void exception(Throwable exception, String... message)
exception
- The thrown exception.message
- The list of messages.CRITICAL
public static void set(Verbose... verboses)
verboses
- Verbosity levels.Copyright © 2017 Byron 3D Games Studio. All rights reserved.