org.apache.log4j
public class ConsoleAppender extends WriterAppender
System.out
or
System.err
using a layout specified by the user. The
default target is System.out
.
Since: 1.1
Field Summary | |
---|---|
static String | SYSTEM_ERR |
static String | SYSTEM_OUT |
protected String | target |
Constructor Summary | |
---|---|
ConsoleAppender()
Constructs an unconfigured appender. | |
ConsoleAppender(Layout layout)
Creates a configured appender.
| |
ConsoleAppender(Layout layout, String target)
Creates a configured appender. |
Method Summary | |
---|---|
void | activateOptions()
Prepares the appender for use. |
protected void | closeWriter()
{@inheritDoc} |
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. |
Parameters: layout layout, may not be null.
Parameters: layout layout, may not be null. target target, either "System.err" or "System.out".
Returns: true if appender will use value of System.out or System.err in force at the time when logging events are appended.
Since: 1.2.13
Parameters: newValue if true, appender will use value of System.out or System.err in force at the time when logging events are appended.
Since: 1.2.13