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() |
(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 messge 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() |
boolean |
shouldError() |
boolean |
shouldInfo() |
boolean |
shouldLog(int priority) |
boolean |
shouldWarn() |
static String |
toLevelString(int level) |
void |
warn(String msg) |
void |
warn(String msg,
Throwable t) |
public static final int DEBUG
public static final int INFO
public static final int WARN
public static final int ERROR
public static final int CRIT
public static final String STR_DEBUG
public static final String STR_INFO
public static final String STR_WARN
public static final String STR_ERROR
public static final String STR_CRIT
public Log(Class<?> cls)
public Log(String name)
Log(LogManager manager, Class<?> cls)
Log(LogManager manager, String name)
Log(LogManager manager, Class<?> cls, String name)
public static int getLevel(String level)
public static String toLevelString(int level)
public void log(int priority, String msg)
public void logAlways(int priority, String msg)
public void debug(String msg)
public void info(String msg)
public void warn(String msg)
public void error(String msg)
public int getMinimumPriority()
public void setMinimumPriority(int priority)
public boolean shouldLog(int priority)
public boolean shouldDebug()
public boolean shouldInfo()
public boolean shouldWarn()
public boolean shouldError()
public void logCloseLoop(Object... desc)
desc
- vararg descriptionpublic void logCloseLoop(int level, Object... desc)
desc
- vararg description of the resourcelevel
- level at which to logpublic String getName()
public Object getScope()