|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.util.Log
public class Log
Wrapper class for whatever logging system I2P uses. This class should be
instantiated and kept as a variable for each class it is used by, ala:
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.
Field Summary | |
---|---|
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 as such subject to change or removal w/o notice. |
void |
logCloseLoop(Object... desc)
logs a loop when closing a resource with level INFO This method is for debugging purposes only and as such 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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
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)
Method Detail |
---|
public static int getLevel(String level)
public static String toLevelString(int level)
public void log(int priority, String msg)
public void log(int priority, String msg, Throwable t)
public void logAlways(int priority, String msg)
public void debug(String msg)
public void debug(String msg, Throwable t)
public void info(String msg)
public void info(String msg, Throwable t)
public void warn(String msg)
public void warn(String msg, Throwable t)
public void error(String msg)
public void error(String msg, Throwable t)
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()
static String getScope(String name, Class<?> cls)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |