edtFTPj/Free - Open-source FTP library for Java | Download


com.enterprisedt.util.debug
Class FileAppender

java.lang.Object
  extended by com.enterprisedt.util.debug.FileAppender
All Implemented Interfaces:
Appender
Direct Known Subclasses:
RollingFileAppender

public class FileAppender
extends java.lang.Object
implements Appender

Appends log statements to a file

Version:
$Revision: 1.8 $
Author:
Bruce Blackshaw

Field Summary
protected  boolean closed
          True if closed
static java.lang.String cvsId
          Revision control id
protected  java.io.PrintWriter log
          Destination
 
Constructor Summary
FileAppender(java.lang.String file)
          Constructor
 
Method Summary
 void close()
          Close this appender
 java.lang.String getFile()
          Returns the path of the logging file.
 void log(java.lang.String msg)
          Log a message
 void log(java.lang.Throwable t)
          Log a stack trace
protected  void open()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cvsId

public static final java.lang.String cvsId
Revision control id

See Also:
Constant Field Values

log

protected java.io.PrintWriter log
Destination


closed

protected boolean closed
True if closed

Constructor Detail

FileAppender

public FileAppender(java.lang.String file)
             throws java.io.IOException
Constructor

Parameters:
file - file to log to
Throws:
java.io.IOException
Method Detail

open

protected void open()
             throws java.io.IOException
Throws:
java.io.IOException

log

public void log(java.lang.String msg)
Log a message

Specified by:
log in interface Appender
Parameters:
msg - message to log

log

public void log(java.lang.Throwable t)
Description copied from interface: Appender
Log a stack trace

Specified by:
log in interface Appender
Parameters:
t - throwable object

close

public void close()
Description copied from interface: Appender
Close this appender

Specified by:
close in interface Appender

getFile

public java.lang.String getFile()
Returns the path of the logging file.

Returns:
the path of the logging file.


Copyright (c) 2001-2007 Enterprise Distributed Technologies Ltd. All Rights Reserved.