SmartFrog 3.10.000

org.smartfrog.sfcore.logging
Class LogImplAsyncWrapper

java.lang.Object
  extended by org.smartfrog.sfcore.logging.LogImplAsyncWrapper
All Implemented Interfaces:
Log, LogLevel, LogMessage, LogSF

public class LogImplAsyncWrapper
extends java.lang.Object
implements LogSF

LogImplAsyncWrapper is a wrapper class for LogImpl that implements asynchronous logging. All log method calls are queued and executed by a worker thread instead of the calling thread.


Field Summary
 
Fields inherited from interface org.smartfrog.sfcore.logging.LogSF
ATR_LOG_LEVEL, ATR_LOGGER_CLASS
 
Fields inherited from interface org.smartfrog.sfcore.logging.LogLevel
LOG_LEVEL_ALL, LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_FATAL, LOG_LEVEL_IGNORE, LOG_LEVEL_INFO, LOG_LEVEL_OFF, LOG_LEVEL_TRACE, LOG_LEVEL_WARN
 
Constructor Summary
LogImplAsyncWrapper(Log logImpl)
          Constructor
LogImplAsyncWrapper(LogSF logSF)
          Constructor
 
Method Summary
 void debug(java.lang.Object message)
           Log a message with debug log level.
 void debug(java.lang.Object message, SmartFrogException t)
           Log an error with debug log level.
 void debug(java.lang.Object message, SmartFrogException t, TerminationRecord tr)
           Log a message with debug log level.
 void debug(java.lang.Object message, java.lang.Throwable t)
           Log an error with debug log level.
 void err(java.lang.Object message)
           Log an error with message log level.
 void err(java.lang.Object message, SmartFrogException t)
           Log an error with message log level.
 void err(java.lang.Object message, SmartFrogException t, TerminationRecord tr)
           Log a message with message log level.
 void err(java.lang.Object message, java.lang.Throwable t)
           Log an error with message log level.
 void error(java.lang.Object message)
           Log a message with error log level.
 void error(java.lang.Object message, SmartFrogException t)
           Log an error with error log level.
 void error(java.lang.Object message, SmartFrogException t, TerminationRecord tr)
           Log a message with error log level.
 void error(java.lang.Object message, java.lang.Throwable t)
           Log an error with error log level.
 void fatal(java.lang.Object message)
           Log a message with fatal log level.
 void fatal(java.lang.Object message, SmartFrogException t)
           Log an error with fatal log level.
 void fatal(java.lang.Object message, SmartFrogException t, TerminationRecord tr)
           Log a message with fatal log level.
 void fatal(java.lang.Object message, java.lang.Throwable t)
           Log an error with fatal log level.
 int getLevel()
           Get logging level.
 java.lang.String getLogName()
           Get log name.
 void ignore(java.lang.Object message)
           Log a message with ignore log level.
 void ignore(java.lang.Object message, SmartFrogException t)
           Log an error with ignore log level.
 void ignore(java.lang.Object message, SmartFrogException t, TerminationRecord tr)
           Log a message with ignore log level.
 void ignore(java.lang.Object message, java.lang.Throwable t)
           Log an error with ignore log level.
 void info(java.lang.Object message)
           Log a message with info log level.
 void info(java.lang.Object message, SmartFrogException t)
           Log an error with info log level.
 void info(java.lang.Object message, SmartFrogException t, TerminationRecord tr)
           Log a message with info log level.
 void info(java.lang.Object message, java.lang.Throwable t)
           Log an error with info log level.
 boolean isDebugEnabled()
           Is debug logging currently enabled?
 boolean isErrorEnabled()
           Is error logging currently enabled?
 boolean isFatalEnabled()
           Is fatal logging currently enabled?
 boolean isIgnoreEnabled()
           Is ignore logging currently enabled?
 boolean isInfoEnabled()
           Is info logging currently enabled?
 boolean isLevelEnabled(int logLevel)
          Is the given log level currently enabled?
 boolean isTraceEnabled()
           Is trace logging currently enabled?
 boolean isWarnEnabled()
           Is warning logging currently enabled?
 void out(java.lang.Object message)
           Log a message with message log level.
 void setLevel(int currentLogLevel)
           Set logging level.
 void trace(java.lang.Object message)
           Log a message with trace log level.
 void trace(java.lang.Object message, SmartFrogException t)
           Log an error with trace log level.
 void trace(java.lang.Object message, SmartFrogException t, TerminationRecord tr)
           Log a message with trace log level.
 void trace(java.lang.Object message, java.lang.Throwable t)
           Log an error with trace log level.
 void warn(java.lang.Object message)
           Log a message with warn log level.
 void warn(java.lang.Object message, SmartFrogException t)
           Log an error with warn log level.
 void warn(java.lang.Object message, SmartFrogException t, TerminationRecord tr)
           Log a message with warn log level.
 void warn(java.lang.Object message, java.lang.Throwable t)
           Log an error with warn log level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogImplAsyncWrapper

public LogImplAsyncWrapper(Log logImpl)
Constructor

Parameters:
logImpl - LogImpl class

LogImplAsyncWrapper

public LogImplAsyncWrapper(LogSF logSF)
Constructor

Parameters:
logSF - logger
Method Detail

getLogName

public java.lang.String getLogName()

Get log name.

Specified by:
getLogName in interface LogSF
Returns:
String log name

setLevel

public void setLevel(int currentLogLevel)

Set logging level.

Specified by:
setLevel in interface LogLevel
Specified by:
setLevel in interface LogSF
Parameters:
currentLogLevel - new logging level

getLevel

public int getLevel()

Get logging level.

Specified by:
getLevel in interface LogLevel
Specified by:
getLevel in interface LogSF
Returns:
int log level

isLevelEnabled

public boolean isLevelEnabled(int logLevel)
Is the given log level currently enabled?

Specified by:
isLevelEnabled in interface LogLevel
Parameters:
logLevel - is this level enabled?
Returns:
boolean true if given log level is currently enabled

isIgnoreEnabled

public boolean isIgnoreEnabled()

Is ignore logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than ignore.

Specified by:
isIgnoreEnabled in interface LogSF
Returns:
boolean true if ignore level is currently enabled

isDebugEnabled

public boolean isDebugEnabled()

Is debug logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than debug.

Specified by:
isDebugEnabled in interface Log
Returns:
boolean true if debug level is currently enabled

isErrorEnabled

public boolean isErrorEnabled()

Is error logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than error.

Specified by:
isErrorEnabled in interface Log
Returns:
boolean true if error level is currently enabled

isFatalEnabled

public boolean isFatalEnabled()

Is fatal logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than fatal.

Specified by:
isFatalEnabled in interface Log
Returns:
boolean true if fatal level is currently enabled

isInfoEnabled

public boolean isInfoEnabled()

Is info logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than info.

Specified by:
isInfoEnabled in interface Log
Returns:
boolean true if info level is currently enabled

isTraceEnabled

public boolean isTraceEnabled()

Is trace logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than trace.

Specified by:
isTraceEnabled in interface Log
Returns:
boolean true if trace level is currently enabled

isWarnEnabled

public boolean isWarnEnabled()

Is warning logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than warn.

Specified by:
isWarnEnabled in interface Log
Returns:
boolean true if warn level is currently enabled

ignore

public void ignore(java.lang.Object message)

Log a message with ignore log level.

Specified by:
ignore in interface LogSF
Parameters:
message - log this message

ignore

public void ignore(java.lang.Object message,
                   java.lang.Throwable t)

Log an error with ignore log level.

Specified by:
ignore in interface LogSF
Parameters:
message - log this message
t - log this cause

ignore

public void ignore(java.lang.Object message,
                   SmartFrogException t,
                   TerminationRecord tr)

Log a message with ignore log level.

Specified by:
ignore in interface LogSF
Parameters:
message - log this message
t - log this cause
tr - log this TerminationRecord

ignore

public void ignore(java.lang.Object message,
                   SmartFrogException t)

Log an error with ignore log level.

Specified by:
ignore in interface LogSF
Parameters:
message - log this message
t - log this cause

trace

public void trace(java.lang.Object message)

Log a message with trace log level.

Specified by:
trace in interface Log
Parameters:
message - log this message

trace

public void trace(java.lang.Object message,
                  java.lang.Throwable t)

Log an error with trace log level.

Specified by:
trace in interface Log
Parameters:
message - log this message
t - log this cause

trace

public void trace(java.lang.Object message,
                  SmartFrogException t,
                  TerminationRecord tr)

Log a message with trace log level.

Specified by:
trace in interface LogSF
Parameters:
message - log this message
t - log this cause
tr - log this TerminationRecord

trace

public void trace(java.lang.Object message,
                  SmartFrogException t)

Log an error with trace log level.

Specified by:
trace in interface LogSF
Parameters:
message - log this message
t - log this cause

debug

public void debug(java.lang.Object message)

Log a message with debug log level.

Specified by:
debug in interface Log
Parameters:
message - log this message

debug

public void debug(java.lang.Object message,
                  java.lang.Throwable t)

Log an error with debug log level.

Specified by:
debug in interface Log
Parameters:
message - log this message
t - log this cause

debug

public void debug(java.lang.Object message,
                  SmartFrogException t,
                  TerminationRecord tr)

Log a message with debug log level.

Specified by:
debug in interface LogSF
Parameters:
message - log this message
t - log this cause
tr - log this TerminationRecord

debug

public void debug(java.lang.Object message,
                  SmartFrogException t)

Log an error with debug log level.

Specified by:
debug in interface LogSF
Parameters:
message - log this message
t - log this cause

info

public void info(java.lang.Object message)

Log a message with info log level.

Specified by:
info in interface Log
Parameters:
message - log this message

info

public void info(java.lang.Object message,
                 java.lang.Throwable t)

Log an error with info log level.

Specified by:
info in interface Log
Parameters:
message - log this message
t - log this cause

info

public void info(java.lang.Object message,
                 SmartFrogException t,
                 TerminationRecord tr)

Log a message with info log level.

Specified by:
info in interface LogSF
Parameters:
message - log this message
t - log this cause
tr - log this TerminationRecord

info

public void info(java.lang.Object message,
                 SmartFrogException t)

Log an error with info log level.

Specified by:
info in interface LogSF
Parameters:
message - log this message
t - log this cause

warn

public void warn(java.lang.Object message)

Log a message with warn log level.

Specified by:
warn in interface Log
Parameters:
message - log this message

warn

public void warn(java.lang.Object message,
                 java.lang.Throwable t)

Log an error with warn log level.

Specified by:
warn in interface Log
Parameters:
message - log this message
t - log this cause

warn

public void warn(java.lang.Object message,
                 SmartFrogException t,
                 TerminationRecord tr)

Log a message with warn log level.

Specified by:
warn in interface LogSF
Parameters:
message - log this message
t - log this cause
tr - log this TerminationRecord

warn

public void warn(java.lang.Object message,
                 SmartFrogException t)

Log an error with warn log level.

Specified by:
warn in interface LogSF
Parameters:
message - log this message
t - log this cause

error

public void error(java.lang.Object message)

Log a message with error log level.

Specified by:
error in interface Log
Parameters:
message - log this message

error

public void error(java.lang.Object message,
                  java.lang.Throwable t)

Log an error with error log level.

Specified by:
error in interface Log
Parameters:
message - log this message
t - log this cause

error

public void error(java.lang.Object message,
                  SmartFrogException t,
                  TerminationRecord tr)

Log a message with error log level.

Specified by:
error in interface LogSF
Parameters:
message - log this message
t - log this cause
tr - log this TerminationRecord

error

public void error(java.lang.Object message,
                  SmartFrogException t)

Log an error with error log level.

Specified by:
error in interface LogSF
Parameters:
message - log this message
t - log this cause

fatal

public void fatal(java.lang.Object message)

Log a message with fatal log level.

Specified by:
fatal in interface Log
Parameters:
message - log this message

fatal

public void fatal(java.lang.Object message,
                  java.lang.Throwable t)

Log an error with fatal log level.

Specified by:
fatal in interface Log
Parameters:
message - log this message
t - log this cause

fatal

public void fatal(java.lang.Object message,
                  SmartFrogException t,
                  TerminationRecord tr)

Log a message with fatal log level.

Specified by:
fatal in interface LogSF
Parameters:
message - log this message
t - log this cause
tr - log this TerminationRecord

fatal

public void fatal(java.lang.Object message,
                  SmartFrogException t)

Log an error with fatal log level.

Specified by:
fatal in interface LogSF
Parameters:
message - log this message
t - log this cause

out

public void out(java.lang.Object message)

Log a message with message log level.

Same as info messages but without Labels.

Specified by:
out in interface LogMessage
Parameters:
message - log this message

err

public void err(java.lang.Object message)

Log an error with message log level.

Same as info messages but without Labels.

Specified by:
err in interface LogMessage
Parameters:
message - log this message

err

public void err(java.lang.Object message,
                java.lang.Throwable t)

Log an error with message log level.

Same as info messages but without Labels.

Specified by:
err in interface LogMessage
Parameters:
message - log this message
t - log this cause

err

public void err(java.lang.Object message,
                SmartFrogException t,
                TerminationRecord tr)

Log a message with message log level.

Same as info messages but without Labels.

Specified by:
err in interface LogMessage
Parameters:
message - log this message
t - log this cause
tr - log this TerminationRecord

err

public void err(java.lang.Object message,
                SmartFrogException t)

Log an error with message log level.

Same as info messages but without Labels.

Specified by:
err in interface LogMessage
Parameters:
message - log this message
t - log this cause

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP