Rice Pastry API

rice.environment.logging.simple
Class SimpleLogger

java.lang.Object
  extended byrice.environment.logging.simple.SimpleLogger
All Implemented Interfaces:
Logger, LogLevelSetter

public class SimpleLogger
extends java.lang.Object
implements Logger, LogLevelSetter

This logger writes its name:time:message to the printstream provided, unless the priority is lower than the minimumPriority.

Version:
$Id: pretty.settings,v 1.3 2005/03/11 20:22:33 jeffh Exp $
Author:
Jeff Hoye

Field Summary
 
Fields inherited from interface rice.environment.logging.Logger
ALL, CONFIG, FINE, FINER, FINEST, INFO, OFF, SEVERE, WARNING
 
Constructor Summary
SimpleLogger(java.lang.String loggerName, AbstractLogManager alm, int minPriority)
          Constructor.
 
Method Summary
 int getMinLogLevel()
          Gets the MinLogLevel attribute of the SimpleLogger object
 void log(int priority, java.lang.String message)
          Prints out loggerName:currentTime:message
 void logException(int priority, java.lang.String message, java.lang.Throwable exception)
          Prints out logger:currentTime:exception.stackTrace();
 void setMinLogLevel(int logLevel)
          Sets the MinLogLevel attribute of the SimpleLogger object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLogger

public SimpleLogger(java.lang.String loggerName,
                    AbstractLogManager alm,
                    int minPriority)
Constructor.

Parameters:
loggerName - the name of this logger.
minPriority - the minimum priority to display.
alm - DESCRIBE THE PARAMETER
Method Detail

getMinLogLevel

public int getMinLogLevel()
Gets the MinLogLevel attribute of the SimpleLogger object

Specified by:
getMinLogLevel in interface LogLevelSetter
Returns:
The MinLogLevel value

setMinLogLevel

public void setMinLogLevel(int logLevel)
Sets the MinLogLevel attribute of the SimpleLogger object

Specified by:
setMinLogLevel in interface LogLevelSetter
Parameters:
logLevel - The new MinLogLevel value

log

public void log(int priority,
                java.lang.String message)
Prints out loggerName:currentTime:message

Specified by:
log in interface Logger
Parameters:
priority - DESCRIBE THE PARAMETER
message - DESCRIBE THE PARAMETER

logException

public void logException(int priority,
                         java.lang.String message,
                         java.lang.Throwable exception)
Prints out logger:currentTime:exception.stackTrace();

Specified by:
logException in interface Logger
Parameters:
priority - DESCRIBE THE PARAMETER
message - DESCRIBE THE PARAMETER
exception - DESCRIBE THE PARAMETER

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection