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

java.lang.Object
  extended by org.norther.tammi.core.logger.log.ForeignLogger
All Implemented Interfaces:
Serializable

public class ForeignLogger
extends Object
implements Serializable

A foreign logger.

Author:
Ilkka Priha
See Also:
Serialized Form

Constructor Summary
ForeignLogger(String name, MBeanServer server)
          Constructs a named logger for the specified MBean server.
 
Method Summary
 int getLevel()
          Gets the log level.
 String getLoggerName()
          Gets the logger name.
 MBeanServer getMBeanServer()
          Gets the MBean server.
 boolean isLog(int level)
          Checks whether the specified log level is enabled.
 void log(int level, Object msg)
          Logs a message.
 void log(int level, Object msg, Throwable cause)
          Logs a message with a throwable.
 void log(int level, String msg, Object arg)
          Logs the specified message with an argument.
 void log(int level, String msg, Object arg, Throwable cause)
          Logs the specified message with an argument and throwable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForeignLogger

public ForeignLogger(String name,
                     MBeanServer server)
Constructs a named logger for the specified MBean server.

Parameters:
name - the logger name.
server - the MBean server.
Method Detail

log

public void log(int level,
                Object msg)
Logs a message.

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

log

public void log(int level,
                String msg,
                Object arg)
Logs the specified message with an argument.

Parameters:
level - the level.
msg - the message.
arg - the argument.

log

public void log(int level,
                Object msg,
                Throwable cause)
Logs a message with a throwable.

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

log

public void log(int level,
                String msg,
                Object arg,
                Throwable cause)
Logs the specified message with an argument and throwable.

Parameters:
level - the level.
msg - the message.
arg - the argument.
cause - the cause.

isLog

public boolean isLog(int level)
Checks whether the specified log level is enabled.

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

getLevel

public int getLevel()
Gets the log level.

Returns:
the level.

getLoggerName

public String getLoggerName()
Gets the logger name.

Returns:
the logger name.

getMBeanServer

public MBeanServer getMBeanServer()
Gets the MBean server.

Returns:
the MBean server.


Copyright © 2004 The Norther Organization. All rights reserved.