Methods Summary |
---|
public void | debug(java.lang.Object message)Logs a message with java.util.logging.Level.FINE .
log(Level.FINE, String.valueOf(message), null);
|
public void | debug(java.lang.Object message, java.lang.Throwable exception)Logs a message with java.util.logging.Level.FINE .
log(Level.FINE, String.valueOf(message), exception);
|
public void | error(java.lang.Object message)Logs a message with java.util.logging.Level.SEVERE .
log(Level.SEVERE, String.valueOf(message), null);
|
public void | error(java.lang.Object message, java.lang.Throwable exception)Logs a message with java.util.logging.Level.SEVERE .
log(Level.SEVERE, String.valueOf(message), exception);
|
public void | fatal(java.lang.Object message)Logs a message with java.util.logging.Level.SEVERE .
log(Level.SEVERE, String.valueOf(message), null);
|
public void | fatal(java.lang.Object message, java.lang.Throwable exception)Logs a message with java.util.logging.Level.SEVERE .
log(Level.SEVERE, String.valueOf(message), exception);
|
public java.util.logging.Logger | getLogger()Return the native Logger instance we are using.
if (logger == null) {
logger = Logger.getLogger(name);
}
return (logger);
|
public void | info(java.lang.Object message)Logs a message with java.util.logging.Level.INFO .
log(Level.INFO, String.valueOf(message), null);
|
public void | info(java.lang.Object message, java.lang.Throwable exception)Logs a message with java.util.logging.Level.INFO .
log(Level.INFO, String.valueOf(message), exception);
|
public boolean | isDebugEnabled()Is debug logging currently enabled?
return (getLogger().isLoggable(Level.FINE));
|
public boolean | isErrorEnabled()Is error logging currently enabled?
return (getLogger().isLoggable(Level.SEVERE));
|
public boolean | isFatalEnabled()Is fatal logging currently enabled?
return (getLogger().isLoggable(Level.SEVERE));
|
public boolean | isInfoEnabled()Is info logging currently enabled?
return (getLogger().isLoggable(Level.INFO));
|
public boolean | isTraceEnabled()Is trace logging currently enabled?
return (getLogger().isLoggable(Level.FINEST));
|
public boolean | isWarnEnabled()Is warn logging currently enabled?
return (getLogger().isLoggable(Level.WARNING));
|
private void | log(java.util.logging.Level level, java.lang.String msg, java.lang.Throwable ex)
// --------------------------------------------------------- Public Methods
Logger logger = getLogger();
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 );
}
}
|
public void | trace(java.lang.Object message)Logs a message with java.util.logging.Level.FINEST .
log(Level.FINEST, String.valueOf(message), null);
|
public void | trace(java.lang.Object message, java.lang.Throwable exception)Logs a message with java.util.logging.Level.FINEST .
log(Level.FINEST, String.valueOf(message), exception);
|
public void | warn(java.lang.Object message)Logs a message with java.util.logging.Level.WARNING .
log(Level.WARNING, String.valueOf(message), null);
|
public void | warn(java.lang.Object message, java.lang.Throwable exception)Logs a message with java.util.logging.Level.WARNING .
log(Level.WARNING, String.valueOf(message), exception);
|