ePOST API

rice.environment.logging.simple
Class SimpleLogManager

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

public class SimpleLogManager
extends AbstractLogManager
implements CloneableLogManager

This class creates loggers that log to a specified PrintStream System.out by default.

Author:
Jeff Hoye

Field Summary
 
Fields inherited from class rice.environment.logging.AbstractLogManager
dateFormat, dateFormatter, enabled, loggers, nullPrintStream, packageOnly, params, prefix, ps, SYSTEM_ERR, SYSTEM_OUT, time
 
Constructor Summary
SimpleLogManager(Parameters params)
          Convienience constructor.
SimpleLogManager(java.io.PrintStream stream, Parameters params)
          Convienience constructor.
SimpleLogManager(java.io.PrintStream stream, TimeSource timeSource, Parameters params)
          Constructor.
SimpleLogManager(java.io.PrintStream stream, TimeSource timeSource, Parameters params, java.lang.String prefix, java.lang.String dateFormat)
           
SimpleLogManager(TimeSource timeSource, Parameters params)
          Convienience constructor.
 
Method Summary
 LogManager clone(java.lang.String detail)
          Return a new LogManager with identical parameters except that there is an indication of detail in each line, or filename if seperated by files.
protected  Logger constructLogger(java.lang.String clazz, int level, boolean useDefault)
           
 Parameters getParameters()
           
 java.io.PrintStream getPrintStream()
           
 TimeSource getTimeSource()
           
 
Methods inherited from class rice.environment.logging.AbstractLogManager
getLogger, getPrefix, parseVal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface rice.environment.logging.LogManager
getLogger
 

Constructor Detail

SimpleLogManager

public SimpleLogManager(java.io.PrintStream stream,
                        TimeSource timeSource,
                        Parameters params)
Constructor.

Parameters:
stream - the stream to write to
timeSource - the timesource to get times from
minPriority - the minimum priority to print

SimpleLogManager

public SimpleLogManager(java.io.PrintStream stream,
                        TimeSource timeSource,
                        Parameters params,
                        java.lang.String prefix,
                        java.lang.String dateFormat)

SimpleLogManager

public SimpleLogManager(Parameters params)
Convienience constructor. Defauts to System.out as the stream, and SimpleTimeSource as the timesource.

Parameters:
minPriority - the minimum priority to print.

SimpleLogManager

public SimpleLogManager(java.io.PrintStream stream,
                        Parameters params)
Convienience constructor. Defauts to SimpleTimeSource as the timesource.

Parameters:
stream - the stream to write to
minPriority - the minimum priority to print

SimpleLogManager

public SimpleLogManager(TimeSource timeSource,
                        Parameters params)
Convienience constructor. Defauts to System.out as the stream.

Parameters:
timeSource - the timesource to get times from
minPriority - the minimum priority to print
Method Detail

getPrintStream

public java.io.PrintStream getPrintStream()
Overrides:
getPrintStream in class AbstractLogManager

getParameters

public Parameters getParameters()

getTimeSource

public TimeSource getTimeSource()
Overrides:
getTimeSource in class AbstractLogManager

constructLogger

protected Logger constructLogger(java.lang.String clazz,
                                 int level,
                                 boolean useDefault)
Specified by:
constructLogger in class AbstractLogManager

clone

public LogManager clone(java.lang.String detail)
Description copied from interface: CloneableLogManager
Return a new LogManager with identical parameters except that there is an indication of detail in each line, or filename if seperated by files.

Specified by:
clone in interface CloneableLogManager
Parameters:
detail - usually will be a nodeid
Returns:
a new LogManager

ePOST API

Copyright © 2001-2005 - Rice Pastry.