org.norther.tammi.acorn.logger.log
Interface Log

All Superinterfaces:
org.slf4j.Logger
All Known Implementing Classes:
DefaultLog, DomainLog

public interface Log
extends org.slf4j.Logger

An interface to logging system implementations based on seven logging levels:

Version:
$Id: Log.java,v 1.12 2010-03-23 14:45:35 cvsimp Exp $
Author:
Ilkka Priha

Nested Class Summary
static class Log.Level
          The log level.
 
Field Summary
static String INTERNAL_ERROR
          An internal error message.
 
Fields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
 
Method Summary
 void access(long time, String msg, Object arg)
          Logs an access message.
 void debug(Object msg)
          Logs a debug message.
 void debug(String msg, Object arg)
          Logs a debug message with an argument.
 void error(Object msg)
          Logs an error message.
 void error(String msg, Object arg)
          Logs an error message with an argument.
 void error(String msg, Object arg, Throwable cause)
          Logs an error message with an argument and reason.
 void fatal(Object msg)
          Logs a fatal message.
 void fatal(String msg, Object arg)
          Logs a fatal message with an argument.
 void fatal(String msg, Object arg, Throwable cause)
          Logs a fatal message with an argument and reason.
 void fatal(String msg, Throwable cause)
          Logs a fatal message with a reason.
 Throwable getCause(Throwable cause)
          Gets the relevant cause of the specified throwable.
 Object getContext()
          Gets the context of this log.
 Log.Level getLevel()
          Gets the log level.
 Object getLogger()
          Gets the logger of this log.
 String getLoggerName()
          Gets the logger name of this log.
 void info(Object msg)
          Logs an info message.
 void info(String msg, Object arg)
          Logs an info message with an argument.
 boolean isAccessEnabled()
          Checks whether access is enabled.
 boolean isActive()
          Checks whether this log is activated.
 boolean isDebugEnabled()
          Checks whether debug is enabled.
 boolean isErrorEnabled()
          Checks whether error is enabled.
 boolean isFatalEnabled()
          Checks whether fatal is enabled.
 boolean isInfoEnabled()
          Checks whether info is enabled.
 boolean isLogEnabled(Log.Level level)
          Checks whether the specified level is enabled.
 boolean isTraceEnabled()
          Checks whether trace is enabled.
 boolean isWarnEnabled()
          Checks whether warn is enabled.
 String localize(Throwable target, Object... localization)
          Localizes the specified exception.
 void log(Log.Level level, long time, String msg, Object arg)
          Logs a message with a specific level, date and argument.
 void log(Log.Level level, long time, String msg, Object arg, Throwable cause)
          Logs a message with a specific level, date, argument and reason.
 void log(Log.Level level, long time, String msg, Throwable cause)
          Logs a message with a specific level, date and reason.
 void log(Log.Level level, Object msg)
          Logs a message with a specific level.
 void log(Log.Level level, String msg, Object arg)
          Logs a message with a specific level and argument.
 void log(Log.Level level, String msg, Object arg, Throwable cause)
          Logs a message with a specific level, argument and reason.
 void log(Log.Level level, String msg, Throwable cause)
          Logs a message with a specific level and reason.
 void trace(Object msg)
          Logs a trace message.
 void trace(String msg, Object arg)
          Logs a trace message with an argument.
 void warn(Object msg)
          Logs a warn message.
 void warn(String msg, Object arg)
          Logs a warn message with an argument.
 void warn(String msg, Object arg, Throwable cause)
          Logs a warn message with an argument and reason.
 
Methods inherited from interface org.slf4j.Logger
debug, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, getName, info, info, info, info, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn
 

Field Detail

INTERNAL_ERROR

static final String INTERNAL_ERROR
An internal error message.

See Also:
Constant Field Values
Method Detail

isTraceEnabled

boolean isTraceEnabled()
Checks whether trace is enabled.

Specified by:
isTraceEnabled in interface org.slf4j.Logger
Returns:
true if enabled, false otherwise.

isDebugEnabled

boolean isDebugEnabled()
Checks whether debug is enabled.

Specified by:
isDebugEnabled in interface org.slf4j.Logger
Returns:
true if enabled, false otherwise.

isInfoEnabled

boolean isInfoEnabled()
Checks whether info is enabled.

Specified by:
isInfoEnabled in interface org.slf4j.Logger
Returns:
true if enabled, false otherwise.

isWarnEnabled

boolean isWarnEnabled()
Checks whether warn is enabled.

Specified by:
isWarnEnabled in interface org.slf4j.Logger
Returns:
true if enabled, false otherwise.

isErrorEnabled

boolean isErrorEnabled()
Checks whether error is enabled.

Specified by:
isErrorEnabled in interface org.slf4j.Logger
Returns:
true if enabled, false otherwise.

isFatalEnabled

boolean isFatalEnabled()
Checks whether fatal is enabled.

Returns:
true if enabled, false otherwise.

isAccessEnabled

boolean isAccessEnabled()
Checks whether access is enabled.

Returns:
true if enabled, false otherwise.

isLogEnabled

boolean isLogEnabled(Log.Level level)
Checks whether the specified level is enabled.

Parameters:
level - the logging level.
Returns:
true if enabled, false otherwise.

getLevel

Log.Level getLevel()
Gets the log level.

Returns:
the logging level.

trace

void trace(Object msg)
Logs a trace message.

Parameters:
msg - the message to log.

trace

void trace(String msg,
           Object arg)
Logs a trace message with an argument.

Specified by:
trace in interface org.slf4j.Logger
Parameters:
msg - the message to log.
arg - the argument or cause.

debug

void debug(Object msg)
Logs a debug message.

Parameters:
msg - the message to log.

debug

void debug(String msg,
           Object arg)
Logs a debug message with an argument.

Specified by:
debug in interface org.slf4j.Logger
Parameters:
msg - the message to log.
arg - the argument or cause.

info

void info(Object msg)
Logs an info message.

Parameters:
msg - the message to log.

info

void info(String msg,
          Object arg)
Logs an info message with an argument.

Specified by:
info in interface org.slf4j.Logger
Parameters:
msg - the message to log.
arg - the argument or cause.

warn

void warn(Object msg)
Logs a warn message.

Parameters:
msg - the message to log.

warn

void warn(String msg,
          Object arg)
Logs a warn message with an argument.

Specified by:
warn in interface org.slf4j.Logger
Parameters:
msg - the message to log.
arg - the argument or cause.

warn

void warn(String msg,
          Object arg,
          Throwable cause)
Logs a warn message with an argument and reason.

Parameters:
msg - the message to log.
arg - the argument.
cause - the cause.

error

void error(Object msg)
Logs an error message.

Parameters:
msg - the message to log.

error

void error(String msg,
           Object arg)
Logs an error message with an argument.

Specified by:
error in interface org.slf4j.Logger
Parameters:
msg - the message to log.
arg - the argument or cause.

error

void error(String msg,
           Object arg,
           Throwable cause)
Logs an error message with an argument and reason.

Parameters:
msg - the message to log.
arg - the argument.
cause - the cause.

fatal

void fatal(Object msg)
Logs a fatal message.

Parameters:
msg - the message to log.

fatal

void fatal(String msg,
           Object arg)
Logs a fatal message with an argument.

Parameters:
msg - the message to log.
arg - the argument or cause.

fatal

void fatal(String msg,
           Throwable cause)
Logs a fatal message with a reason.

Parameters:
msg - the message to log.
cause - the cause.

fatal

void fatal(String msg,
           Object arg,
           Throwable cause)
Logs a fatal message with an argument and reason.

Parameters:
msg - the message to log.
arg - the argument.
cause - the cause.

access

void access(long time,
            String msg,
            Object arg)
Logs an access message.

Parameters:
time - the time of the event.
msg - the message to log.
arg - the argument.

log

void log(Log.Level level,
         Object msg)
Logs a message with a specific level.

Parameters:
level - the level of the message.
msg - the message to log.

log

void log(Log.Level level,
         String msg,
         Object arg)
Logs a message with a specific level and argument.

Parameters:
level - the level of the message.
msg - the message to log.
arg - the argument or cause.

log

void log(Log.Level level,
         String msg,
         Throwable cause)
Logs a message with a specific level and reason.

Parameters:
level - the level of the message.
msg - the message to log.
cause - the cause.

log

void log(Log.Level level,
         String msg,
         Object arg,
         Throwable cause)
Logs a message with a specific level, argument and reason.

Parameters:
level - the level of the message.
msg - the message to log.
arg - the argument.
cause - the cause.

log

void log(Log.Level level,
         long time,
         String msg,
         Object arg)
Logs a message with a specific level, date and argument.

Parameters:
level - the level of the message.
time - the time of the event.
msg - the message to log.
arg - the argument or cause.

log

void log(Log.Level level,
         long time,
         String msg,
         Throwable cause)
Logs a message with a specific level, date and reason.

Parameters:
level - the level of the message.
time - the time of the event.
msg - the message to log.
cause - the cause.

log

void log(Log.Level level,
         long time,
         String msg,
         Object arg,
         Throwable cause)
Logs a message with a specific level, date, argument and reason.

Parameters:
level - the level of the message.
time - the time of the event.
msg - the message to log.
arg - the argument.
cause - the cause.

localize

String localize(Throwable target,
                Object... localization)
Localizes the specified exception. The localization may contain any combination of a localizer, a locale and an argument

The message is constructed by using the exception type and non-localized message as a key for the localized message. If such a message can't be found, the plain exception type is used as the key. If such a message is found and it ends with a colon, the non-localized message is appended to it. If such a message is not found, the non-localized message is returned unmodified.

Parameters:
target - the exception.
localization - the localization.
Returns:
the localized message.

getLoggerName

String getLoggerName()
Gets the logger name of this log.

Returns:
the logger name.

getLogger

Object getLogger()
Gets the logger of this log.

Returns:
the logger.

getContext

Object getContext()
Gets the context of this log.

Returns:
the context.

getCause

Throwable getCause(Throwable cause)
Gets the relevant cause of the specified throwable.

Parameters:
cause - the cause throwable.
Returns:
the relevat cause.

isActive

boolean isActive()
Checks whether this log is activated.

Returns:
true if activated, false otherwise.


Copyright © 2004 The Norther Organization. All rights reserved.