osnap.api.functionality
Class LogWriter

java.lang.Object
  extended by osnap.api.functionality.LogWriter

public class LogWriter
extends java.lang.Object

Software using the ModuleAPI can use this class as an easy way to create and append to logfiles.


Constructor Summary
LogWriter()
           
 
Method Summary
static void logEntry(java.lang.String fileName, java.lang.String message)
          Appends a message to a log file.
static void stackTraceMessage(java.lang.String fileName, java.lang.Exception exception)
          Appends a message to a stacktrace log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogWriter

public LogWriter()
Method Detail

logEntry

public static void logEntry(java.lang.String fileName,
                            java.lang.String message)
Appends a message to a log file. Creates the file if it does not exist

Parameters:
fileName - Name of the log file
message - Message to append to the logfile

stackTraceMessage

public static void stackTraceMessage(java.lang.String fileName,
                                     java.lang.Exception exception)
Appends a message to a stacktrace log file. Creates the file if it does not exist

Parameters:
fileName - Name of the stacktrace log file
exception - Exception to log