org.norther.tammi.core.logger.log
Class DomainLog

java.lang.Object
  extended by org.norther.tammi.acorn.logger.log.DefaultLog
      extended by org.norther.tammi.core.logger.log.DomainLog
All Implemented Interfaces:
Serializable, EventListener, Log, LoggerListener

public class DomainLog
extends DefaultLog

A default implementation of Log.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.norther.tammi.acorn.logger.log.Log
ACCESS, DEBUG, ERROR, FATAL, INFO, INTERNAL_ERROR, LEVELS, NONE, TRACE, WARN, WARNING
 
Constructor Summary
DomainLog()
          Constructs a new log.
DomainLog(String name)
          Constructs a new log for a named logger.
 
Method Summary
 int getLevel()
          Gets the log level.
protected  Localizer getLocalizer()
          Gets the localizer.
 boolean isActive()
          Checks whether this log is activated.
 boolean isLog(int level)
          Checks whether the specified level is enabled.
 void log(int level, long time, String msg, Object arg)
          Logs a message with a specific level, date and argument.
 void log(int level, long time, String msg, Object arg, Throwable cause)
          Logs a message with a specific level, date, argument and reason.
 void log(int level, Object msg)
          Logs a message with a specific level.
 void log(int level, String msg, Object arg)
          Logs a message with a specific level and argument.
 void log(int level, String msg, Object arg, Throwable cause)
          Logs a message with a specific level, argument and reason.
 
Methods inherited from class org.norther.tammi.acorn.logger.log.DefaultLog
access, activated, debug, debug, error, error, error, fatal, fatal, fatal, getContext, getLogFactory, getLogger, getLoggerName, info, info, isAccess, isDebug, isError, isFatal, isInfo, isTrace, isWarn, localize, localize, localize, localize, localize, localize, localize, localize, trace, trace, warn, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainLog

public DomainLog()
Constructs a new log.


DomainLog

public DomainLog(String name)
Constructs a new log for a named logger.

Parameters:
name - the named logger.
Method Detail

isLog

public boolean isLog(int level)
Description copied from interface: Log
Checks whether the specified level is enabled.

Specified by:
isLog in interface Log
Overrides:
isLog in class DefaultLog
Parameters:
level - the logging level.
Returns:
true if enabled, false otherwise.

getLevel

public int getLevel()
Description copied from interface: Log
Gets the log level.

Specified by:
getLevel in interface Log
Overrides:
getLevel in class DefaultLog
Returns:
the logging level.

log

public void log(int level,
                Object msg)
Description copied from interface: Log
Logs a message with a specific level.

Specified by:
log in interface Log
Overrides:
log in class DefaultLog
Parameters:
level - the level of the message.
msg - the message to log.

log

public void log(int level,
                String msg,
                Object arg)
Description copied from interface: Log
Logs a message with a specific level and argument.

Specified by:
log in interface Log
Overrides:
log in class DefaultLog
Parameters:
level - the level of the message.
msg - the message to log.
arg - the argument or cause.

log

public void log(int level,
                String msg,
                Object arg,
                Throwable cause)
Description copied from interface: Log
Logs a message with a specific level, argument and reason.

Specified by:
log in interface Log
Overrides:
log in class DefaultLog
Parameters:
level - the level of the message.
msg - the message to log.
arg - the argument.
cause - the cause.

log

public void log(int level,
                long time,
                String msg,
                Object arg)
Description copied from interface: Log
Logs a message with a specific level, date and argument.

Specified by:
log in interface Log
Overrides:
log in class DefaultLog
Parameters:
level - the level of the message.
time - the time of the event.
msg - the message to log.
arg - the argument or cause.

log

public void log(int level,
                long time,
                String msg,
                Object arg,
                Throwable cause)
Description copied from interface: Log
Logs a message with a specific level, date, argument and reason.

Specified by:
log in interface Log
Overrides:
log in class DefaultLog
Parameters:
level - the level of the message.
time - the time of the event.
msg - the message to log.
arg - the argument.
cause - the cause.

isActive

public boolean isActive()
Description copied from interface: Log
Checks whether this log is activated.

Specified by:
isActive in interface Log
Overrides:
isActive in class DefaultLog
Returns:
true if activated, false otherwise.

getLocalizer

protected Localizer getLocalizer()
Description copied from class: DefaultLog
Gets the localizer.

Overrides:
getLocalizer in class DefaultLog
Returns:
the localizer or null.


Copyright © 2004 The Norther Organization. All rights reserved.