public class Log extends Object
private final Log _log = context.logManager().getLog(MyClassName.class);
If there is anything in here that doesn't make sense, turn off your computer and go fly a kite.| Modifier and Type | Field and Description |
|---|---|
static int |
CRIT |
static int |
DEBUG |
static int |
ERROR |
static int |
INFO |
static String |
STR_CRIT |
static String |
STR_DEBUG |
static String |
STR_ERROR |
static String |
STR_INFO |
static String |
STR_WARN |
static int |
WARN |
| Constructor and Description |
|---|
Log(Class<?> cls)
Warning - not recommended.
|
Log(LogManager manager,
Class<?> cls) |
Log(LogManager manager,
Class<?> cls,
String name) |
Log(LogManager manager,
String name) |
Log(String name)
Warning - not recommended.
|
| Modifier and Type | Method and Description |
|---|---|
void |
debug(String msg) |
void |
debug(String msg,
Throwable t) |
void |
error(String msg) |
void |
error(String msg,
Throwable t) |
static int |
getLevel(String level) |
int |
getMinimumPriority() |
String |
getName() |
Object |
getScope()
Returns the LogScope (private class).
|
(package private) static String |
getScope(String name,
Class<?> cls) |
void |
info(String msg) |
void |
info(String msg,
Throwable t) |
void |
log(int priority,
String msg) |
void |
log(int priority,
String msg,
Throwable t) |
void |
logAlways(int priority,
String msg)
Always log this message with the given priority, ignoring current minimum priority level.
|
void |
logCloseLoop(int level,
Object... desc)
Logs a close loop when closing a resource
This method is for debugging purposes only and
is subject to change or removal w/o notice.
|
void |
logCloseLoop(Object... desc)
logs a loop when closing a resource with level DEBUG
This method is for debugging purposes only and
is subject to change or removal w/o notice.
|
void |
setMinimumPriority(int priority) |
boolean |
shouldDebug()
Check if DEBUG level logging is enabled.
|
boolean |
shouldError()
Check if ERROR level logging is enabled.
|
boolean |
shouldInfo()
Check if INFO level logging is enabled.
|
boolean |
shouldLog(int priority) |
boolean |
shouldWarn()
Check if WARN level logging is enabled.
|
static String |
toLevelString(int level) |
void |
warn(String msg) |
void |
warn(String msg,
Throwable t) |
public static final int CRIT
public static final int DEBUG
public static final int ERROR
public static final int INFO
public static final String STR_CRIT
public static final String STR_DEBUG
public static final String STR_ERROR
public static final String STR_INFO
public static final String STR_WARN
public static final int WARN
public Log(Class<?> cls)
Log(LogManager manager, Class<?> cls)
Log(LogManager manager, Class<?> cls, String name)
Log(LogManager manager, String name)
public Log(String name)
public void debug(String msg)
public void error(String msg)
public static int getLevel(String level)
public int getMinimumPriority()
public String getName()
public Object getScope()
public void info(String msg)
public void log(int priority,
String msg)
public void logAlways(int priority,
String msg)
public void logCloseLoop(int level,
Object... desc)
desc - vararg description of the resourcelevel - level at which to logpublic void logCloseLoop(Object... desc)
desc - vararg descriptionpublic void setMinimumPriority(int priority)
public boolean shouldDebug()
public boolean shouldError()
public boolean shouldInfo()
public boolean shouldLog(int priority)
public boolean shouldWarn()
public static String toLevelString(int level)
public void warn(String msg)