|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log4j.AppenderSkeleton org.apache.log4j.WriterAppender org.elasticsearch.common.logging.log4j.ConsoleAppender
public class ConsoleAppender
ConsoleAppender appends log events to System.out
or
System.err
using a layout specified by the user. The
default target is System.out
.
ElasticSearch: Adapter from log4j to allow to disable console logging...
Field Summary | |
---|---|
static java.lang.String |
SYSTEM_ERR
|
static java.lang.String |
SYSTEM_OUT
|
protected java.lang.String |
target
|
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 | |
---|---|
ConsoleAppender()
Constructs an unconfigured appender. |
|
ConsoleAppender(org.apache.log4j.Layout layout)
Creates a configured appender. |
|
ConsoleAppender(org.apache.log4j.Layout layout,
java.lang.String target)
Creates a configured appender. |
Method Summary | |
---|---|
void |
activateOptions()
Prepares the appender for use. |
protected void |
closeWriter()
|
boolean |
getFollow()
Gets whether the appender honors reassignments of System.out or System.err made after configuration. |
java.lang.String |
getTarget()
Returns the current value of the Target property. |
void |
setFollow(boolean newValue)
Sets whether the appender honors reassignments of System.out or System.err made after configuration. |
void |
setTarget(java.lang.String value)
Sets the value of the Target option. |
Methods inherited from class org.apache.log4j.WriterAppender |
---|
append, checkEntryConditions, close, createWriter, getEncoding, getImmediateFlush, requiresLayout, reset, 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 |
Field Detail |
---|
public static final java.lang.String SYSTEM_OUT
public static final java.lang.String SYSTEM_ERR
protected java.lang.String target
Constructor Detail |
---|
public ConsoleAppender()
public ConsoleAppender(org.apache.log4j.Layout layout)
layout
- layout, may not be null.public ConsoleAppender(org.apache.log4j.Layout layout, java.lang.String target)
layout
- layout, may not be null.target
- target, either "System.err" or "System.out".Method Detail |
---|
public void setTarget(java.lang.String value)
public java.lang.String getTarget()
setTarget(java.lang.String)
.
public final void setFollow(boolean newValue)
newValue
- if true, appender will use value of System.out or
System.err in force at the time when logging events are appended.public final boolean getFollow()
public void activateOptions()
activateOptions
in interface org.apache.log4j.spi.OptionHandler
activateOptions
in class org.apache.log4j.WriterAppender
protected final void closeWriter()
closeWriter
in class org.apache.log4j.WriterAppender
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |