org.knime.core.util
Class LogfileAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by org.apache.log4j.WriterAppender
          extended by org.apache.log4j.FileAppender
              extended by org.knime.core.util.LogfileAppender
All Implemented Interfaces:
Appender, OptionHandler

public class LogfileAppender
extends FileAppender

This is a special appender for KNIME that writes into the knime.log file, which is typically located in the current workspace. If the log file gets bigger than a certain size the file is gzipped and renamed and a new empty file is created.

Author:
Thorsten Meinl, University of Konstanz

Field Summary
static long MAX_LOG_SIZE_DEFAULT
          Maximum size of log file before it is split (in bytes).
static String MAX_SIZE_ENV_VARIABLE
          Name of the environment variable, which allows one to change the default log file size.
 
Fields inherited from class org.apache.log4j.FileAppender
bufferedIO, bufferSize, fileAppend, fileName
 
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
LogfileAppender()
          Creates a new LogfileAppender.
 
Method Summary
 void activateOptions()
          
protected  void subAppend(LoggingEvent event)
          
 
Methods inherited from class org.apache.log4j.FileAppender
closeFile, getAppend, getBufferedIO, getBufferSize, getFile, reset, setAppend, setBufferedIO, setBufferSize, setFile, setFile, setQWForFiles
 
Methods inherited from class org.apache.log4j.WriterAppender
append, checkEntryConditions, close, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, 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
 

Field Detail

MAX_SIZE_ENV_VARIABLE

public static final String MAX_SIZE_ENV_VARIABLE
Name of the environment variable, which allows one to change the default log file size. Values must be integer, possibly succeeded by "m" or "k" to denote that the given value is in mega or kilo byte.

See Also:
Constant Field Values

MAX_LOG_SIZE_DEFAULT

public static final long MAX_LOG_SIZE_DEFAULT
Maximum size of log file before it is split (in bytes).

See Also:
Constant Field Values
Constructor Detail

LogfileAppender

public LogfileAppender()
Creates a new LogfileAppender.

Method Detail

activateOptions

public void activateOptions()

Specified by:
activateOptions in interface OptionHandler
Overrides:
activateOptions in class FileAppender

subAppend

protected void subAppend(LoggingEvent event)

Overrides:
subAppend in class WriterAppender


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.