fr.inria.peerunit.util
Class PeerUnitLogger

java.lang.Object
  extended by fr.inria.peerunit.util.PeerUnitLogger

public class PeerUnitLogger
extends java.lang.Object

The application log class. This class is used for log application runtime events. This class's objects are parameterized by the values of properties of application properties file.

Since:
1.0
Version:
1.0
Author:
Eduardo Almeida, Aboubakar Koïta

Constructor Summary
PeerUnitLogger(java.lang.String name)
          In the constructor, either a existing logger corresponding to the argument is cover, or a new logger is created.
 
Method Summary
 void createLogger(java.lang.String pattern)
          This method set the logger parameters, a file handler with his, the level.
 void log(java.util.logging.Level level, java.lang.String msg)
          Log a message at a given level.
 void logStackTrace(java.lang.Exception e)
          Log a exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeerUnitLogger

public PeerUnitLogger(java.lang.String name)
In the constructor, either a existing logger corresponding to the argument is cover, or a new logger is created.

Parameters:
name - the name of the logger to find or to create
Method Detail

createLogger

public void createLogger(java.lang.String pattern)
This method set the logger parameters, a file handler with his, the level.

Parameters:
pattern - the path of the file must containing logging messages

log

public void log(java.util.logging.Level level,
                java.lang.String msg)
Log a message at a given level.

Parameters:
level - the level of logging
msg - the message to log

logStackTrace

public void logStackTrace(java.lang.Exception e)
Log a exception.

Parameters:
e - the exception to log


Copyright © 2010. All Rights Reserved.