issrg.editor2
Class ErrorLogger

java.lang.Object
  extended by issrg.editor2.ErrorLogger

public class ErrorLogger
extends java.lang.Object

Author:
Chris

Constructor Summary
ErrorLogger()
          Creates a new instance of ErrorLogger
 
Method Summary
 void addToLog(java.lang.StackTraceElement[] s)
          Adds the PrintStream to the Log.
 void addToLog(java.lang.String s)
          Adds to a String Variable
 void clearTmpLog()
           
 java.lang.String getFileName()
          Gets the file Name
 byte[] getTmpLog()
           
 void load()
          Tries to Load a file called 'PEv2Errors.log' that is a file containing a log file for saving PE Errors
 void setFileName(java.lang.String fname)
          Sets the file Name
 void writeToFile()
          Writes contents of the stream to the log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorLogger

public ErrorLogger()
Creates a new instance of ErrorLogger

Method Detail

load

public void load()
Tries to Load a file called 'PEv2Errors.log' that is a file containing a log file for saving PE Errors

This method first tries to open the 'PEveErrors.log' file in the home folder. If this file does not exist in the home folder, it will obtain a default 'PEv2Errors.log' file stored in the programs Resources.


setFileName

public void setFileName(java.lang.String fname)
Sets the file Name

Parameters:
fname - The file Name in String Format

getFileName

public java.lang.String getFileName()
Gets the file Name

Returns:
the filename

addToLog

public void addToLog(java.lang.StackTraceElement[] s)
Adds the PrintStream to the Log.


addToLog

public void addToLog(java.lang.String s)
Adds to a String Variable


getTmpLog

public byte[] getTmpLog()

clearTmpLog

public void clearTmpLog()

writeToFile

public void writeToFile()
Writes contents of the stream to the log file.