com.orindasoft.pub
Class TextLog

java.lang.Object
  extended by com.orindasoft.pub.GenericLog
      extended by com.orindasoft.pub.TextLog
All Implemented Interfaces:
LogInterface
Direct Known Subclasses:
UiLog

public class TextLog
extends GenericLog
implements LogInterface

A heavyweight implementation of LogInterface.

TextLog is a logging mechanism designed for large volumes of data over a protracted period of time. Log files are stored in their own dedicated directory structure. See LogInterface
(c) Copyright 2003 - 2012 Orinda Software Ltd

Version:
6.0
Author:
Orinda Software

Field Summary
 
Fields inherited from interface com.orindasoft.pub.LogInterface
DEBUG, DEFAULT_FIELD_DELIMITER, DEFAULT_FILENAME_DAY_FORMAT, DEFAULT_FILENAME_TIME_FORMAT, DEFAULT_TIME_FORMAT_STRING, ERROR, INFO, SYSERR, WARN
 
Constructor Summary
TextLog(java.lang.String thePrefix)
          Create an instance of TextLog.
TextLog(java.lang.String theDirectoryName, java.lang.String thePrefix)
          Create an instance of TextLog.
 
Method Summary
 void close()
          Flush and close the current log file.
 void flush()
          Flush any outstanding changes.
 boolean getConsoleOutput()
          Find out whether messages are being sent to standard output and standard error.
 java.lang.String getCurrentLog()
          Get current log file name.
 void setConsoleOutput(boolean sendOutputToConsole)
          Set whether messages are to be sent to standard output and standard error.
 
Methods inherited from class com.orindasoft.pub.GenericLog
debug, debug, debugOff, debugOn, error, error, error, error, getDateFormat, getDebug, info, info, setAutoFlush, setAutoLog, syserror, syserror, syserror, syserror, warning, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.orindasoft.pub.LogInterface
debug, debug, debugOff, debugOn, error, error, error, error, getDateFormat, getDebug, info, info, setAutoFlush, setAutoLog, syserror, syserror, syserror, syserror, warning, warning
 

Constructor Detail

TextLog

public TextLog(java.lang.String thePrefix)
Create an instance of TextLog. The log files will reside in the current working directory.

Parameters:
String - logPrefix A mnemonic prefix used for naming the log file.

TextLog

public TextLog(java.lang.String theDirectoryName,
               java.lang.String thePrefix)
Create an instance of TextLog. The log files will reside in the directory specified.

Parameters:
String - theDirectory the absolute path of the logging directory.
String - logPrefix An mnemonic prefix used for naming the log file.
Method Detail

close

public void close()
Flush and close the current log file.


flush

public void flush()
Flush any outstanding changes.

Specified by:
flush in interface LogInterface
Specified by:
flush in class GenericLog

getCurrentLog

public java.lang.String getCurrentLog()
Get current log file name.

Specified by:
getCurrentLog in interface LogInterface
Specified by:
getCurrentLog in class GenericLog
Returns:
An absolute file name if we are writing to a log file.

getConsoleOutput

public boolean getConsoleOutput()
Find out whether messages are being sent to standard output and standard error.


setConsoleOutput

public void setConsoleOutput(boolean sendOutputToConsole)
Set whether messages are to be sent to standard output and standard error.



Copyright © Orinda Software Ltd 2012Logo