@ThreadSafe @Policy(value="Ensure initialization ASAP in main class") public final class TridentLogger extends com.google.common.collect.ForwardingCollection<TridentLogger> implements Registry<TridentLogger>
Modifier and Type | Method and Description |
---|---|
void |
debug(String message)
Logs debug to the logger output
|
protected Collection<TridentLogger> |
delegate() |
void |
error(String message)
Logs an error message to the class logger with a red escape
|
void |
error(Throwable throwable)
Formats a throwable to be logged to the console
|
static TridentLogger |
get()
Obtains the logger for the class that calls this method
|
static TridentLogger |
get(Class<?> cls)
Obtains the logger for the class that is specified
|
static TridentLogger |
get(org.slf4j.Logger logger)
Wraps the logger with a TridentLogger instance
|
static TridentLogger |
get(String name)
Obtains a logger, creating a new one if it does not exist in the logger registry
|
static void |
init(org.apache.log4j.Level level) |
LoggerDelegate |
internal()
Obtains the internal underlying representation of the logger
|
void |
log(String item)
Logs a message to the class logger
|
void |
success(String item)
Logs to the logger with a green escape
|
void |
warn(String item)
Warns the console with a yellow escape
|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRemoveAll, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
@InternalUseOnly public static void init(org.apache.log4j.Level level)
public LoggerDelegate internal()
protected Collection<TridentLogger> delegate()
delegate
in class com.google.common.collect.ForwardingCollection<TridentLogger>
public static TridentLogger get()
public static TridentLogger get(Class<?> cls)
cls
- the specified classpublic static TridentLogger get(org.slf4j.Logger logger)
logger
- the logger to wrappublic static TridentLogger get(String name)
name
- the logger namepublic void log(String item)
item
- the item to logpublic void debug(String message)
message
- the message to logpublic void error(String message)
message
- the message to logpublic void warn(String item)
item
- the item to logpublic void success(String item)
item
- the item to logCopyright © 2016. All rights reserved.