public class SimpleLog
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SimpleLog.LogListener
This interface has to be able to register (via
addListener(net.dv8tion.jda.core.utils.SimpleLog.LogListener) ) and listen to log-messages. |
Modifier and Type | Field and Description |
---|---|
static org.slf4j.event.Level |
LEVEL
The global LOG-level that is used as standard if not overwritten
|
static boolean |
SLF4J_ENABLED |
Modifier and Type | Method and Description |
---|---|
static void |
addListener(SimpleLog.LogListener listener)
Adds a custom Listener that receives all logs
|
void |
debug(java.lang.Object msg)
Will LOG a message with debug level
|
void |
fatal(java.lang.Object msg)
Will LOG a message with fatal level
|
org.slf4j.event.Level |
getEffectiveLevel()
Gets the effective logging-level of this Logger.
|
org.slf4j.event.Level |
getLevel()
Gets the current logging-level of this Logger.
|
static SimpleLog |
getLog(java.lang.Class<?> clazz) |
static SimpleLog |
getLog(java.lang.String name)
Will get the LOG with the given LOG-name or create one if it didn't exist
|
java.lang.String |
getName() |
void |
info(java.lang.Object msg)
Will LOG a message with info level
|
void |
log(org.slf4j.event.Level level,
java.lang.Object obj)
Will LOG a message with given LOG-level
|
static void |
removeListener(SimpleLog.LogListener listener)
Removes a custom Listener
|
void |
setLevel(org.slf4j.event.Level lev)
Set the LOG-level
All messages with lower LOG-level will not be printed
If this level is set to null, the global Log-level (
LEVEL ) will be used |
void |
trace(java.lang.Object msg)
Will LOG a message with trace level.
|
void |
warn(java.lang.Object msg)
Will LOG a message with warning level
|
public static org.slf4j.event.Level LEVEL
public static final boolean SLF4J_ENABLED
public java.lang.String getName()
public void setLevel(org.slf4j.event.Level lev)
LEVEL
) will be usedlev
- the new LOG-levelpublic org.slf4j.event.Level getLevel()
public org.slf4j.event.Level getEffectiveLevel()
public void log(org.slf4j.event.Level level, java.lang.Object obj)
level
- The level of the Logobj
- The message to LOGpublic void trace(java.lang.Object msg)
msg
- the object, which should be loggedpublic void debug(java.lang.Object msg)
msg
- the object, which should be loggedpublic void info(java.lang.Object msg)
msg
- the object, which should be loggedpublic void warn(java.lang.Object msg)
msg
- the object, which should be loggedpublic void fatal(java.lang.Object msg)
msg
- the object, which should be loggedpublic static SimpleLog getLog(java.lang.String name)
name
- the name of the LOGpublic static SimpleLog getLog(java.lang.Class<?> clazz)
public static void addListener(SimpleLog.LogListener listener)
listener
- the listener to addpublic static void removeListener(SimpleLog.LogListener listener)
listener
- the listener to remove