logging
Class Logger

java.lang.Object
  extended by logging.Logger
All Implemented Interfaces:
java.io.Serializable

public class Logger
extends java.lang.Object
implements java.io.Serializable

An object of this class can log events on a file.

Author:
Majd Kokaly
See Also:
Serialized Form

Constructor Summary
Logger(java.lang.String fileName)
          Default constructor
 
Method Summary
 void closeStreams()
          This method is used to close all the input/output streams
 java.lang.String getFileName()
           
 boolean isTextMode()
           
 void log(java.lang.String eventString)
           
 void logEvent(Event ev)
           
 void printAllEvents()
          This method prints the events stored in the file that this logger is attached to on the standard output.
 void setTextMode(boolean textMode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger

public Logger(java.lang.String fileName)
Default constructor

Parameters:
fileName - is the name of the file that the Logger object will store events on.
Method Detail

getFileName

public java.lang.String getFileName()

isTextMode

public boolean isTextMode()

setTextMode

public void setTextMode(boolean textMode)

log

public void log(java.lang.String eventString)
Parameters:
eventString - it is event Description

logEvent

public void logEvent(Event ev)
Parameters:
ev - is the event object to be logged

printAllEvents

public void printAllEvents()
This method prints the events stored in the file that this logger is attached to on the standard output.


closeStreams

public void closeStreams()
This method is used to close all the input/output streams