java.lang.Object | |||
↳ | org.apache.log4j.AppenderSkeleton | ||
↳ | org.apache.log4j.WriterAppender | ||
↳ | org.apache.log4j.ConsoleAppender |
ConsoleAppender appends log events to System.out
or
System.err
using a layout specified by the user. The
default target is System.out
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | SYSTEM_ERR | ||||||||||
String | SYSTEM_OUT |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
target |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.log4j.WriterAppender
| |||||||||||
From class
org.apache.log4j.AppenderSkeleton
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an unconfigured appender.
| |||||||||||
Creates a configured appender.
| |||||||||||
Creates a configured appender.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Prepares the appender for use.
| |||||||||||
Gets whether the appender honors reassignments of System.out
or System.err made after configuration.
| |||||||||||
Returns the current value of the Target property.
| |||||||||||
Sets whether the appender honors reassignments of System.out
or System.err made after configuration.
| |||||||||||
Sets the value of the Target option.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Close the underlying java.io.Writer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.log4j.WriterAppender
| |||||||||||
From class
org.apache.log4j.AppenderSkeleton
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.apache.log4j.Appender
| |||||||||||
From interface
org.apache.log4j.spi.OptionHandler
|
Constructs an unconfigured appender.
Creates a configured appender.
layout | layout, may not be null. |
---|
Creates a configured appender.
layout | layout, may not be null. |
---|---|
target | target, either "System.err" or "System.out". |
Prepares the appender for use.
Gets whether the appender honors reassignments of System.out or System.err made after configuration.
Returns the current value of the Target property. The
default value of the option is "System.out".
See also setTarget(String)
.
Sets whether the appender honors reassignments of System.out or System.err made after configuration.
newValue | if true, appender will use value of System.out or System.err in force at the time when logging events are appended. |
---|
Sets the value of the Target option. Recognized values are "System.out" and "System.err". Any other value will be ignored.
Close the underlying java.io.Writer.