Rice Pastry API

rice.environment.logging
Class AbstractLogManager

java.lang.Object
  extended by rice.environment.logging.AbstractLogManager
All Implemented Interfaces:
LogManager
Direct Known Subclasses:
RotatingLogManager, SimpleLogManager

public abstract class AbstractLogManager
extends java.lang.Object
implements LogManager

Author:
jstewart

Field Summary
protected  java.lang.String dateFormat
           
 javax.swing.text.DateFormatter dateFormatter
           
protected  boolean enabled
           
protected  java.util.Hashtable<java.lang.String,Logger> loggers
          Hashtable of loggers stored by full.class.name[instance]
protected static java.io.PrintStream nullPrintStream
           
protected  boolean packageOnly
          If we only want package level granularity.
protected  Parameters params
           
protected  java.lang.String prefix
           
protected  java.io.PrintStream ps
           
static java.lang.String SYSTEM_ERR
           
static java.lang.String SYSTEM_OUT
           
protected  TimeSource time
           
 
Constructor Summary
protected AbstractLogManager(java.io.PrintStream stream, TimeSource timeSource, Parameters params, java.lang.String prefix, java.lang.String df)
           
 
Method Summary
protected abstract  Logger constructLogger(java.lang.String clazz, int level, boolean useDefault)
           
 Logger getLogger(java.lang.Class clazz, java.lang.String instance)
          Returns the Logger matching the parameters, constructs a new one if an appropriate one hasn't yet been constructed.
 java.lang.String getPrefix()
           
 java.io.PrintStream getPrintStream()
           
 TimeSource getTimeSource()
           
protected  int parseVal(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loggers

protected java.util.Hashtable<java.lang.String,Logger> loggers
Hashtable of loggers stored by full.class.name[instance]


params

protected Parameters params

time

protected TimeSource time

ps

protected java.io.PrintStream ps

prefix

protected java.lang.String prefix

dateFormat

protected java.lang.String dateFormat

packageOnly

protected boolean packageOnly
If we only want package level granularity.


enabled

protected boolean enabled

nullPrintStream

protected static final java.io.PrintStream nullPrintStream

dateFormatter

public javax.swing.text.DateFormatter dateFormatter

SYSTEM_OUT

public static final java.lang.String SYSTEM_OUT
See Also:
Constant Field Values

SYSTEM_ERR

public static final java.lang.String SYSTEM_ERR
See Also:
Constant Field Values
Constructor Detail

AbstractLogManager

protected AbstractLogManager(java.io.PrintStream stream,
                             TimeSource timeSource,
                             Parameters params,
                             java.lang.String prefix,
                             java.lang.String df)
Method Detail

parseVal

protected int parseVal(java.lang.String key)

getLogger

public Logger getLogger(java.lang.Class clazz,
                        java.lang.String instance)
Description copied from interface: LogManager
Returns the Logger matching the parameters, constructs a new one if an appropriate one hasn't yet been constructed.

Specified by:
getLogger in interface LogManager
Parameters:
clazz - the Class associated with this logger.
instance - the instance-name associated with this logger.
Returns:
the logger.

constructLogger

protected abstract Logger constructLogger(java.lang.String clazz,
                                          int level,
                                          boolean useDefault)

getTimeSource

public TimeSource getTimeSource()

getPrintStream

public java.io.PrintStream getPrintStream()

getPrefix

public java.lang.String getPrefix()

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection