org.apache.hadoop.yarn
Class ContainerLogAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by org.apache.log4j.WriterAppender
          extended by org.apache.log4j.FileAppender
              extended by org.apache.hadoop.yarn.ContainerLogAppender
All Implemented Interfaces:
Flushable, org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

@InterfaceAudience.Public
@InterfaceStability.Unstable
public class ContainerLogAppender
extends org.apache.log4j.FileAppender
implements Flushable

A simple log4j-appender for container's 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
ContainerLogAppender()
           
 
Method Summary
 void activateOptions()
           
 void append(org.apache.log4j.spi.LoggingEvent event)
           
 void close()
           
 void flush()
           
 String getContainerLogDir()
          Getter/Setter methods for log4j.
 long getTotalLogFileSize()
           
 void setContainerLogDir(String containerLogDir)
           
 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, shouldFlush, 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

ContainerLogAppender

public ContainerLogAppender()
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()
Specified by:
flush in interface Flushable

close

public void close()
Specified by:
close in interface org.apache.log4j.Appender
Overrides:
close in class org.apache.log4j.WriterAppender

getContainerLogDir

public String getContainerLogDir()
Getter/Setter methods for log4j.


setContainerLogDir

public void setContainerLogDir(String containerLogDir)

getTotalLogFileSize

public long getTotalLogFileSize()

setTotalLogFileSize

public void setTotalLogFileSize(long logSize)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.