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 Object
implements LogManager

Author:
jstewart

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

Field Detail

loggers

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


params

protected Parameters params

time

protected TimeSource time

ps

protected PrintStream ps

prefix

protected String prefix

dateFormat

protected String dateFormat

packageOnly

protected boolean packageOnly
If we only want package level granularity.


enabled

protected boolean enabled

nullPrintStream

protected static final PrintStream nullPrintStream

dateFormatter

public DateFormatter dateFormatter

SYSTEM_OUT

public static final String SYSTEM_OUT
See Also:
Constant Field Values

SYSTEM_ERR

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

AbstractLogManager

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

parseVal

protected int parseVal(String key)

getLogger

public Logger getLogger(Class clazz,
                        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(String clazz,
                                          int level,
                                          boolean useDefault)

getTimeSource

public TimeSource getTimeSource()

getPrintStream

public PrintStream getPrintStream()

getPrefix

public String getPrefix()


Copyright © 2010. All Rights Reserved.