nl.justobjects.pushlet.util
Class DefaultLogger

java.lang.Object
  extended by nl.justobjects.pushlet.util.DefaultLogger
All Implemented Interfaces:
ConfigDefs, PushletLogger

public class DefaultLogger
extends java.lang.Object
implements PushletLogger

Default logger.

Logs to stdout. Override this class by setting "logger.class" in pushlet.properties to your own logger to integrate your own logging library.

Version:
$Id: DefaultLogger.java,v 1.2 2007/12/07 12:57:40 justb Exp $
Author:
Just van den Broecke

Field Summary
private  int level
          Level intialized with default.
 
Fields inherited from interface nl.justobjects.pushlet.core.ConfigDefs
CONTROLLER_CLASS, DISPATCHER_CLASS, LISTEN_FORCE_PULL_AGENTS, LISTEN_FORCE_PULL_ALL, LOG_LEVEL, LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_FATAL, LOG_LEVEL_INFO, LOG_LEVEL_TRACE, LOG_LEVEL_WARN, LOGGER_CLASS, POLL_REFRESH_TIMEOUT_MILLIS, POLL_REFRESH_WAIT_MAX_MILLIS, POLL_REFRESH_WAIT_MIN_MILLIS, PULL_REFRESH_TIMEOUT_MILLIS, PULL_REFRESH_WAIT_MAX_MILLIS, PULL_REFRESH_WAIT_MIN_MILLIS, QUEUE_READ_TIMEOUT_MILLIS, QUEUE_SIZE, QUEUE_WRITE_TIMEOUT_MILLIS, SESSION_CLASS, SESSION_ID_GENERATION, SESSION_ID_GENERATION_RANDOMSTRING, SESSION_ID_GENERATION_UUID, SESSION_ID_SIZE, SESSION_MANAGER_CLASS, SESSION_TIMEOUT_MINS, SOURCES_ACTIVATE, SUBSCRIBER_CLASS, SUBSCRIPTION_CLASS
 
Constructor Summary
DefaultLogger()
           
 
Method Summary
 void debug(java.lang.String aMessage)
          Log message for debug level.
 void error(java.lang.String aMessage)
          Log message for error level.
 void error(java.lang.String aMessage, java.lang.Throwable aThrowable)
          Log message (error level with exception).
 void fatal(java.lang.String aMessage)
          Log message for fatal level.
 void fatal(java.lang.String aMessage, java.lang.Throwable aThrowable)
          Log message (fatal level with exception).
 void info(java.lang.String aMessage)
          Log message for info level.
 void init()
          Method allowing to initialize our logger
private  void print(java.lang.String aTag, java.lang.String aMessage)
          Print message.
 void setLevel(int aLevel)
          Set log level
 void trace(java.lang.String aMessage)
          Log message for trace level.
 void warn(java.lang.String aMessage)
          Log message for warning level.
 void warn(java.lang.String aMessage, java.lang.Throwable aThrowable)
          Log message for warning level with exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

level

private int level
Level intialized with default.

Constructor Detail

DefaultLogger

public DefaultLogger()
Method Detail

init

public void init()
Description copied from interface: PushletLogger
Method allowing to initialize our logger

Specified by:
init in interface PushletLogger

trace

public void trace(java.lang.String aMessage)
Log message for trace level.

Specified by:
trace in interface PushletLogger
Parameters:
aMessage - the message to be logged

debug

public void debug(java.lang.String aMessage)
Log message for debug level.

Specified by:
debug in interface PushletLogger
Parameters:
aMessage - the message to be logged

info

public void info(java.lang.String aMessage)
Log message for info level.

Specified by:
info in interface PushletLogger
Parameters:
aMessage - the message to be logged

warn

public void warn(java.lang.String aMessage)
Log message for warning level.

Specified by:
warn in interface PushletLogger
Parameters:
aMessage - the message to be logged

warn

public void warn(java.lang.String aMessage,
                 java.lang.Throwable aThrowable)
Log message for warning level with exception.

Specified by:
warn in interface PushletLogger
Parameters:
aMessage - the message to be logged
aThrowable - the exception

error

public void error(java.lang.String aMessage)
Log message for error level.

Specified by:
error in interface PushletLogger
Parameters:
aMessage - the message to be logged

error

public void error(java.lang.String aMessage,
                  java.lang.Throwable aThrowable)
Log message (error level with exception).

Specified by:
error in interface PushletLogger
Parameters:
aMessage - the message to be logged
aThrowable - the exception

fatal

public void fatal(java.lang.String aMessage)
Log message for fatal level.

Specified by:
fatal in interface PushletLogger
Parameters:
aMessage - the message to be logged

fatal

public void fatal(java.lang.String aMessage,
                  java.lang.Throwable aThrowable)
Log message (fatal level with exception).

Specified by:
fatal in interface PushletLogger
Parameters:
aMessage - the message to be logged
aThrowable - the exception

setLevel

public void setLevel(int aLevel)
Set log level

Specified by:
setLevel in interface PushletLogger
Parameters:
aLevel - the message to be logged

print

private void print(java.lang.String aTag,
                   java.lang.String aMessage)
Print message.

Parameters:
aTag - the log type
aMessage - the message to be logged


Copyright 2000-2003 - Just Objects B.V.