Methods Summary |
---|
public final void | debug(java.lang.Object message)
log(Level.FINE, String.valueOf(message), null);
|
public final void | debug(java.lang.Object message, java.lang.Throwable t)
log(Level.FINE, String.valueOf(message), t);
|
public final void | error(java.lang.Object message)
log(Level.SEVERE, String.valueOf(message), null);
|
public final void | error(java.lang.Object message, java.lang.Throwable t)
log(Level.SEVERE, String.valueOf(message), t);
|
public final void | fatal(java.lang.Object message)
log(Level.SEVERE, String.valueOf(message), null);
|
public final void | fatal(java.lang.Object message, java.lang.Throwable t)
log(Level.SEVERE, String.valueOf(message), t);
|
static Log | getInstance(java.lang.String name)
return new DirectJDKLog( name );
|
public final void | info(java.lang.Object message)
log(Level.INFO, String.valueOf(message), null);
|
public final void | info(java.lang.Object message, java.lang.Throwable t)
log(Level.INFO, String.valueOf(message), t);
|
public final boolean | isDebugEnabled()
return logger.isLoggable(Level.FINE);
|
public final boolean | isErrorEnabled()
return logger.isLoggable(Level.SEVERE);
|
public final boolean | isFatalEnabled()
return logger.isLoggable(Level.SEVERE);
|
public final boolean | isInfoEnabled()
return logger.isLoggable(Level.INFO);
|
public final boolean | isTraceEnabled()
return logger.isLoggable(Level.FINER);
|
public final boolean | isWarnEnabled()
return logger.isLoggable(Level.WARNING);
|
private void | log(java.util.logging.Level level, java.lang.String msg, java.lang.Throwable ex)
if (logger.isLoggable(level)) {
// Hack (?) to get the stack trace.
Throwable dummyException=new Throwable();
StackTraceElement locations[]=dummyException.getStackTrace();
// Caller will be the third element
String cname="unknown";
String method="unknown";
if( locations!=null && locations.length >2 ) {
StackTraceElement caller=locations[2];
cname=caller.getClassName();
method=caller.getMethodName();
}
if( ex==null ) {
logger.logp( level, cname, method, msg );
} else {
logger.logp( level, cname, method, msg, ex );
}
}
|
static void | release()
|
public final void | trace(java.lang.Object message)
log(Level.FINER, String.valueOf(message), null);
|
public final void | trace(java.lang.Object message, java.lang.Throwable t)
log(Level.FINER, String.valueOf(message), t);
|
public final void | warn(java.lang.Object message)
log(Level.WARNING, String.valueOf(message), null);
|
public final void | warn(java.lang.Object message, java.lang.Throwable t)
log(Level.WARNING, String.valueOf(message), t);
|