com.go.trove.log
Class FileLogStreamFactory

java.lang.Object
  |
  +--com.go.trove.log.FileLogStreamFactory
All Implemented Interfaces:
IntervalLogStream.Factory

public class FileLogStreamFactory
extends java.lang.Object
implements IntervalLogStream.Factory

Opens up files to be used by an IntervalLogStream.

Version:
13 , 9/07/00
Author:
Brian S O'Neill

Constructor Summary
FileLogStreamFactory(java.io.File directory, java.text.DateFormat format, java.lang.String extension)
          Creates log files in the given directory.
 
Method Summary
 java.io.OutputStream openOutputStream(java.util.Date date)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileLogStreamFactory

public FileLogStreamFactory(java.io.File directory,
                            java.text.DateFormat format,
                            java.lang.String extension)
Creates log files in the given directory. The names are created by appending the name of the directory, a hyphen, a time stamp and an extension. For example, if the directory is "/logs/MyApp", the format is "yyyyMMdd", and the extension is ".log", then a generated file might be: "/logs/MyApp/MyApp-19990608.log".
Parameters:
directory - Directory to create log files in.
format - DateFormat to use for creating new file names.
extension - Extension to put at the end of new file name.
Method Detail

openOutputStream

public java.io.OutputStream openOutputStream(java.util.Date date)
                                      throws java.io.IOException
Specified by:
openOutputStream in interface IntervalLogStream.Factory