public class ConsoleAppender extends WriterAppender
System.out or
 System.err using a layout specified by the user. The default
 target is System.out.| Modifier and Type | Field and Description | 
|---|---|
static String | 
SYSTEM_ERR  | 
static String | 
SYSTEM_OUT  | 
protected String | 
target  | 
encoding, immediateFlush, qwclosed, errorHandler, headFilter, layout, name, tailFilter, threshold| Constructor and Description | 
|---|
ConsoleAppender()
Constructs an unconfigured appender. 
 | 
ConsoleAppender(Layout layout)
Creates a configured appender. 
 | 
ConsoleAppender(Layout layout,
               String target)
Creates a configured appender. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
activateOptions()
Prepares the appender for use. 
 | 
protected void | 
closeWriter()
Close the underlying  
Writer. | 
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, writeHeaderaddFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setLayout, setName, setThresholdpublic static final String SYSTEM_OUT
public static final String SYSTEM_ERR
protected String target
public ConsoleAppender()
public ConsoleAppender(Layout layout)
layout - layout, may not be null.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 in interface OptionHandleractivateOptions in class WriterAppenderprotected final void closeWriter()
Writer.closeWriter in class WriterAppenderCopyright © 1999–2024 QOS.CH Sarl (Switzerland). All rights reserved.