|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.logging.Logging
public class Logging
This class is a wrapper around Logger
and
LogManager
offering additional convenience functions.
If a class keeps a static reference to the appropriate Logging
object,
performance penalty compared to standard logging should be minimal.
However when using LogRecord
directly instead of
ELKILogRecord
, the use of the log(LogRecord)
method will result in
incorrectly logged cause location. Therefore, use ELKILogRecord
!
Field Summary | |
---|---|
private Logger |
logger
Wrapped logger |
private static HashMap<String,Logging> |
loggers
HashMap to keep track of loggers. |
Constructor Summary | |
---|---|
Logging(Logger logger)
Constructor, wrapping a logger. |
Method Summary | |
---|---|
void |
debug(CharSequence message)
Log a message at the 'fine' debugging level. |
void |
debug(CharSequence message,
Throwable e)
Log a message at the 'fine' debugging level. |
void |
debugFine(CharSequence message)
Log a message at the 'fine' debugging level. |
void |
debugFine(CharSequence message,
Throwable e)
Log a message at the 'fine' debugging level. |
void |
debugFiner(CharSequence message)
Log a message at the 'finer' debugging level. |
void |
debugFiner(CharSequence message,
Throwable e)
Log a message at the 'finer' debugging level. |
void |
debugFinest(CharSequence message)
Log a message at the 'finest' debugging level. |
void |
debugFinest(CharSequence message,
Throwable e)
Log a message at the 'finest' debugging level. |
void |
error(CharSequence message)
Log a message at the 'severe' level. |
void |
error(CharSequence message,
Throwable e)
Log a message at the 'severe' level. |
void |
exception(CharSequence message,
Throwable e)
Log a message with exception at the 'severe' level. |
void |
exception(Throwable e)
Log an exception at the 'severe' level. |
void |
fine(CharSequence message)
Log a message at the 'fine' debugging level. |
void |
fine(CharSequence message,
Throwable e)
Log a message at the 'fine' debugging level. |
void |
finer(CharSequence message)
Log a message at the 'finer' debugging level. |
void |
finer(CharSequence message,
Throwable e)
Log a message at the 'finer' debugging level. |
void |
finest(CharSequence message)
Log a message at the 'finest' debugging level. |
void |
finest(CharSequence message,
Throwable e)
Log a message at the 'finest' debugging level. |
static Logging |
getLogger(Class<?> c)
Retrieve logging utility for a particular class. |
static Logging |
getLogger(String name)
Retrieve logging utility for a particular class. |
Logger |
getWrappedLogger()
|
boolean |
isDebugging()
Test whether to log 'debug' at 'FINE' level. |
boolean |
isDebuggingFine()
Test whether to log 'debug' at 'FINE' level This is the same as isDebugging() |
boolean |
isDebuggingFiner()
Test whether to log 'debug' at 'FINER' level |
boolean |
isDebuggingFinest()
Test whether to log 'debug' at 'FINEST' level |
boolean |
isLoggable(Level lev)
Verify if logging is enabled at that particular level. |
boolean |
isVerbose()
Test whether to log 'verbose'. |
void |
log(Level level,
CharSequence message)
Log a log message at the given level. |
void |
log(Level level,
CharSequence message,
Throwable e)
Log a log message and exception at the given level. |
void |
log(LogRecord rec)
Log a given log record (should be a ELKILogRecord ) |
void |
progress(Progress pgr)
Log a Progress object. |
void |
verbose(CharSequence message)
Log a message at the 'info' ('verbose') level. |
void |
verbose(CharSequence message,
Throwable e)
Log a message at the 'info' ('verbose') level. |
void |
warning(CharSequence message)
Log a message at the 'warning' level. |
void |
warning(CharSequence message,
Throwable e)
Log a message at the 'warning' level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static HashMap<String,Logging> loggers
private final Logger logger
Constructor Detail |
---|
public Logging(Logger logger)
logger
- Logger to wrap.Method Detail |
---|
public static Logging getLogger(Class<?> c)
c
- Class to retrieve logging for
public static Logging getLogger(String name)
name
- Class name
public boolean isLoggable(Level lev)
lev
- Logging level
public boolean isVerbose()
public boolean isDebugging()
isDebuggingFine()
public boolean isDebuggingFine()
isDebugging()
public boolean isDebuggingFiner()
public boolean isDebuggingFinest()
public void log(Level level, CharSequence message)
level
- Level to log at.message
- Message to log.public void log(Level level, CharSequence message, Throwable e)
level
- Level to log at.message
- Message to log.e
- Exceptionpublic void log(LogRecord rec)
ELKILogRecord
)
rec
- Log record to log.public void error(CharSequence message, Throwable e)
message
- Warning log message.e
- Exceptionpublic void error(CharSequence message)
message
- Warning log message.public void warning(CharSequence message, Throwable e)
message
- Warning log message.e
- Exceptionpublic void warning(CharSequence message)
message
- Warning log message.public void verbose(CharSequence message, Throwable e)
message
- Informational log message.e
- Exceptionpublic void verbose(CharSequence message)
message
- Informational log message.public void debug(CharSequence message, Throwable e)
message
- Informational log message.e
- Exceptionpublic void debug(CharSequence message)
message
- Informational log message.public void debugFine(CharSequence message, Throwable e)
message
- Informational log message.e
- Exceptionpublic void debugFine(CharSequence message)
message
- Informational log message.public void fine(CharSequence message, Throwable e)
message
- Informational log message.e
- Exceptionpublic void fine(CharSequence message)
message
- Informational log message.public void debugFiner(CharSequence message, Throwable e)
message
- Informational log message.e
- Exceptionpublic void debugFiner(CharSequence message)
message
- Informational log message.public void finer(CharSequence message, Throwable e)
message
- Informational log message.e
- Exceptionpublic void finer(CharSequence message)
message
- Informational log message.public void debugFinest(CharSequence message, Throwable e)
message
- Informational log message.e
- Exceptionpublic void debugFinest(CharSequence message)
message
- Informational log message.public void finest(CharSequence message, Throwable e)
message
- Informational log message.e
- Exceptionpublic void finest(CharSequence message)
message
- Informational log message.public void exception(CharSequence message, Throwable e)
message
- Error log message.e
- Exceptionpublic void exception(Throwable e)
e
- Exceptionpublic void progress(Progress pgr)
pgr
- Progress to log.public Logger getWrappedLogger()
Logger
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |