## org.apache.hadoop.mapred
Class TaskLogAppender

    java.lang.Object
      org.apache.log4j.AppenderSkeleton
          org.apache.log4j.WriterAppender
              org.apache.log4j.FileAppender
                  org.apache.hadoop.mapred.TaskLogAppender

All Implemented Interfaces:
  org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

    public class TaskLogAppender

extends org.apache.log4j.FileAppender

A simple log4j-appender for the task child's map-reduce system logs.

Field Summary

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
`TaskLogAppender()`

Method Summary
`void` `activateOptions()`
`void` `append(org.apache.log4j.spi.LoggingEvent event)`
`void` `close()`
`void` `flush()`
`boolean` `getIsCleanup()` Get whether task is cleanup attempt or not.
`String` `getTaskId()` Getter/Setter methods for log4j.
`long` `getTotalLogFileSize()`
`void` `setIsCleanup(boolean isCleanup)` Set whether the task is a cleanup attempt or not.
`void` `setTaskId(String taskId)`
`void` `setTotalLogFileSize(long logSize)`

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
`checkEntryConditions, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, setEncoding, setErrorHandler, setImmediateFlush, setWriter, subAppend, 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

### TaskLogAppender

    public TaskLogAppender()

Method Detail

### activateOptions

    public void activateOptions()

  Specified by:
    `activateOptions` in interface `org.apache.log4j.spi.OptionHandler`
  Overrides:
    `activateOptions` in class `org.apache.log4j.FileAppender`

### append

    public void append(org.apache.log4j.spi.LoggingEvent event)

  Overrides:
    `append` in class `org.apache.log4j.WriterAppender`

### flush

    public void flush()

### close

    public void close()

  Specified by:
    `close` in interface `org.apache.log4j.Appender`
  Overrides:
    `close` in class `org.apache.log4j.WriterAppender`

### getTaskId

    public String getTaskId()

  Getter/Setter methods for log4j.

### setTaskId

    public void setTaskId(String taskId)

### getTotalLogFileSize

    public long getTotalLogFileSize()

### setTotalLogFileSize

    public void setTotalLogFileSize(long logSize)

### setIsCleanup

    public void setIsCleanup(boolean isCleanup)

  Set whether the task is a cleanup attempt or not.

  Parameters:
    `isCleanup` - true if the task is cleanup attempt, false otherwise.

### getIsCleanup

    public boolean getIsCleanup()

  Get whether task is cleanup attempt or not.

  Returns:
    true if the task is cleanup attempt, false otherwise.

Copyright © 2009 The Apache Software Foundation