edu.washington.cs.rfid.util
Class Logger

java.lang.Object
  extended by edu.washington.cs.rfid.util.Logger

public class Logger
extends java.lang.Object

A generic logging utility. Supports the creation and maintenance of log files.

Author:
Evan

Constructor Summary
Logger(java.lang.String baseName)
          Creates a new Logger.
Logger(java.lang.String baseDir, java.lang.String baseName)
          Creates a new Logger.
 
Method Summary
 void log(java.lang.String msg)
          Logs the given message to the log file.
 void shutdown()
          Shuts down this logger by flushing and closing the output stream;
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger

public Logger(java.lang.String baseDir,
              java.lang.String baseName)
Creates a new Logger. Searches the given base directory for other log files having the same specified base name and creates a new log file with the same base name but a unique (i.e. incrementally numbered) full name.

Parameters:
baseDir - The base directory
baseName - The base filename

Logger

public Logger(java.lang.String baseName)
Creates a new Logger. Searches the default base directory for other log files having the same specified base name and creates a new log file with the same base name but a unique (i.e. incrementally numbered) full name.

Parameters:
baseName - The base filename
Method Detail

shutdown

public void shutdown()
Shuts down this logger by flushing and closing the output stream;


log

public void log(java.lang.String msg)
Logs the given message to the log file.

Parameters:
msg - The message