com.partnersoft.platform.j2se
Class StandardLogAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by org.apache.log4j.WriterAppender
          extended by com.partnersoft.platform.j2se.StandardLogAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class StandardLogAppender
extends org.apache.log4j.WriterAppender

Appends log events to a file, rolling based on size.

This is similar to the standard log4j RollingFileAppender, but uses a more reasonable naming scheme. RollingFileAppender added the sequence number at the end of the file name, which defeated Windows' attempts to read the thing (since it uses the last extension for file associations).

Logs are stored in files with names representing date and time down to the This implementation names the logs logname.log, logname-01.log, logname-02.log, etc.

They are rolled when the size exceeds 10M.

Copyright 2006 Partner Software, Inc.

Author:
Paul Reavis

Field Summary
 
Fields inherited from class org.apache.log4j.WriterAppender
encoding, immediateFlush, qw
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
StandardLogAppender()
           
 
Method Summary
 void activateOptions()
           
 java.lang.String getFileName()
          Returns the file name.
 void setFileName(java.lang.String newName)
          Sets the file name.
protected  void subAppend(org.apache.log4j.spi.LoggingEvent event)
           
 
Methods inherited from class org.apache.log4j.WriterAppender
append, checkEntryConditions, close, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, reset, setEncoding, setErrorHandler, setImmediateFlush, setWriter, writeFooter, writeHeader
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardLogAppender

public StandardLogAppender()
Method Detail

activateOptions

public void activateOptions()
Specified by:
activateOptions in interface org.apache.log4j.spi.OptionHandler
Overrides:
activateOptions in class org.apache.log4j.WriterAppender

getFileName

public java.lang.String getFileName()
Returns the file name. This is actually a base name, and will have .log at least, or -01.log, -02.log, etc. appended to it.


setFileName

public void setFileName(java.lang.String newName)
Sets the file name. This is actually a base name, and will have .log at least, or -01.log, -02.log, etc. appended to it.


subAppend

protected void subAppend(org.apache.log4j.spi.LoggingEvent event)
Overrides:
subAppend in class org.apache.log4j.WriterAppender