net.codesmarts.log4j
Class FileSystemBugReportAppender

java.lang.Object
  extended byorg.apache.log4j.AppenderSkeleton
      extended bynet.codesmarts.log4j.AbstractBugReportAppender
          extended bynet.codesmarts.log4j.FileSystemBugReportAppender
All Implemented Interfaces:
org.apache.log4j.Appender, BugReportAppender, org.apache.log4j.spi.OptionHandler

public class FileSystemBugReportAppender
extends AbstractBugReportAppender

Log4j appender that collects logging evnets in the same thread in a common buffer

Author:
Fred McCann

Field Summary
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
FileSystemBugReportAppender()
           
 
Method Summary
 void append(BugReport report)
          Addend a logging event
 java.lang.String getDirectory()
          Get the name of the directory in which bug reports are filed
 java.lang.String getExtension()
          Get the extension of bug report files.
 void init()
          Initialize appender
 void setDirectory(java.lang.String directory)
          Set the bug report directory.
 void setExtension(java.lang.String extension)
          Set the extension of bug report files
 
Methods inherited from class net.codesmarts.log4j.AbstractBugReportAppender
activateOptions, append, close, doAppend, getHashingMethod, getHashMethod, getMaxSize, getThresholdPriority, getThresholdSize, isReportDuplicates, requiresLayout, setHashingMethod, setLayout, setMaxSize, setReportDuplicates, setThresholdPriority, setThresholdSize
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemBugReportAppender

public FileSystemBugReportAppender()
Method Detail

init

public void init()
Initialize appender

Specified by:
init in class AbstractBugReportAppender

append

public void append(BugReport report)
Addend a logging event

Specified by:
append in interface BugReportAppender
Specified by:
append in class AbstractBugReportAppender
See Also:
AppenderSkeleton.append(org.apache.log4j.spi.LoggingEvent)

getDirectory

public java.lang.String getDirectory()
Get the name of the directory in which bug reports are filed

Returns:
Returns the directory.

setDirectory

public void setDirectory(java.lang.String directory)
Set the bug report directory. Defaults to "."

Parameters:
directory - The directory to set.

getExtension

public java.lang.String getExtension()
Get the extension of bug report files. Defaults to no extension

Returns:
Returns the extension.

setExtension

public void setExtension(java.lang.String extension)
Set the extension of bug report files

Parameters:
extension - The extension to set.


Copyright © 2005 CodeSmarts. All Rights Reserved.