org.talika.tarsis.log
Interface Logger

All Known Implementing Classes:
LoggerService

public interface Logger

Interface that defines logger component in Tarsis MVC Framework.

Logger interface defines methods to log messages, error messages and exceptions.
There are defined five log level messages: DEBUG, INFO, WARNING, ERROR and PANIC.

Version:
$Revision: 269 $
Author:
Jose M. Palomar

Field Summary
static int DEBUG
          Debug level.
static int ERROR
          Error level.
static int INFO
          Information level.
static int PANIC
          Panic level.
static int WARNING
          Warning level.
 
Method Summary
 int getLogLevel()
          Returns log level.
 boolean isDebugEnabled()
          Returns true if log level is debug or higher.
 boolean isErrorEnabled()
          Returns true if log level is error or higher.
 boolean isInfoEnabled()
          Returns true if log level is info or higher.
 boolean isPanicEnabled()
          Returns true if log level is panic or higher.
 boolean isWarningEnabled()
          Returns true if log level is warning or higher.
 void log(int level, java.lang.String msg)
          Log a message using given level.
 void log(int level, java.lang.String msg, java.lang.Throwable t)
          Log an error message using given level.
 void logDebug(java.lang.String msg)
          Log a message using debug level.
 void logError(java.lang.String msg, java.lang.Throwable t)
          Log an error message using error level.
 void logInfo(java.lang.String msg)
          Log a message using information level.
 void logPanic(java.lang.String msg)
          Log a message using panic level.
 void logPanic(java.lang.String msg, java.lang.Throwable t)
          Log an error message using panic level.
 void logWarning(java.lang.String msg)
          Log a message using warning level.
 

Field Detail

DEBUG

public static final int DEBUG
Debug level.

See Also:
Constant Field Values

INFO

public static final int INFO
Information level.

See Also:
Constant Field Values

WARNING

public static final int WARNING
Warning level.

See Also:
Constant Field Values

ERROR

public static final int ERROR
Error level.

See Also:
Constant Field Values

PANIC

public static final int PANIC
Panic level.

See Also:
Constant Field Values
Method Detail

getLogLevel

public int getLogLevel()
Returns log level.

Returns:
int log level.

log

public void log(int level,
                java.lang.String msg)
Log a message using given level.

Parameters:
level - int log level.
msg - String message.

log

public void log(int level,
                java.lang.String msg,
                java.lang.Throwable t)
Log an error message using given level.

Parameters:
level - int log level.
msg - String message.
t - Throwable a Throwable object.

logDebug

public void logDebug(java.lang.String msg)
Log a message using debug level.

Parameters:
msg - String message.

logInfo

public void logInfo(java.lang.String msg)
Log a message using information level.

Parameters:
msg - String message.

logWarning

public void logWarning(java.lang.String msg)
Log a message using warning level.

Parameters:
msg - String message.

logError

public void logError(java.lang.String msg,
                     java.lang.Throwable t)
Log an error message using error level.

Parameters:
msg - String message.
t - Throwable a Throwable object.

logPanic

public void logPanic(java.lang.String msg)
Log a message using panic level.

Parameters:
msg - String message.

logPanic

public void logPanic(java.lang.String msg,
                     java.lang.Throwable t)
Log an error message using panic level.

Parameters:
msg - String message.
t - Throwable a Throwable object.

isDebugEnabled

public boolean isDebugEnabled()
Returns true if log level is debug or higher.

Returns:
boolean true if log level is debug or higher.

isInfoEnabled

public boolean isInfoEnabled()
Returns true if log level is info or higher.

Returns:
boolean true if log level is info or higher.

isWarningEnabled

public boolean isWarningEnabled()
Returns true if log level is warning or higher.

Returns:
boolean true if log level is warning or higher.

isErrorEnabled

public boolean isErrorEnabled()
Returns true if log level is error or higher.

Returns:
boolean true if log level is error or higher.

isPanicEnabled

public boolean isPanicEnabled()
Returns true if log level is panic or higher.

Returns:
boolean true if log level is panic or higher.


Copyright © 2002-2005 Talika Open Source Group. All Rights Reserved.