public class ConsoleAppender
extends org.apache.log4j.WriterAppender
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...
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static String |
SYSTEM_ERR |
static String |
SYSTEM_OUT |
protected String |
target |
| コンストラクタと説明 |
|---|
ConsoleAppender()
Constructs an unconfigured appender.
|
ConsoleAppender(org.apache.log4j.Layout layout)
Creates a configured appender.
|
ConsoleAppender(org.apache.log4j.Layout layout,
String target)
Creates a configured appender.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
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.
|
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(String value)
Sets the value of the Target option.
|
append, checkEntryConditions, close, createWriter, getEncoding, getImmediateFlush, requiresLayout, reset, setEncoding, setErrorHandler, setImmediateFlush, setWriter, shouldFlush, subAppend, writeFooter, writeHeaderprotected String target
public ConsoleAppender()
public ConsoleAppender(org.apache.log4j.Layout layout)
layout - layout, may not be null.public ConsoleAppender(org.apache.log4j.Layout layout,
String target)
layout - layout, may not be null.target - target, either "System.err" or "System.out".public void setTarget(String value)
public String getTarget()
See also 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 インタフェース内 org.apache.log4j.spi.OptionHandleractivateOptions クラス内 org.apache.log4j.WriterAppenderprotected final void closeWriter()
closeWriter クラス内 org.apache.log4j.WriterAppenderCopyright © 2009–2016. All rights reserved.