Methods Summary |
---|
public void | activateOptions()Prepares the appender for use.
if (follow) {
if (target.equals(SYSTEM_ERR)) {
setWriter(createWriter(new SystemErrStream()));
} else {
setWriter(createWriter(new SystemOutStream()));
}
} else {
if (target.equals(SYSTEM_ERR)) {
setWriter(createWriter(System.err));
} else {
setWriter(createWriter(System.out));
}
}
super.activateOptions();
|
protected final void | closeWriter(){@inheritDoc}
if (follow) {
super.closeWriter();
}
|
public final boolean | getFollow()Gets whether the appender honors reassignments of System.out
or System.err made after configuration.
return follow;
|
public java.lang.String | getTarget()Returns the current value of the Target property. The
default value of the option is "System.out".
See also {@link #setTarget}.
return target;
|
public final void | setFollow(boolean newValue)Sets whether the appender honors reassignments of System.out
or System.err made after configuration.
follow = newValue;
|
public void | setTarget(java.lang.String value)Sets the value of the Target option. Recognized values
are "System.out" and "System.err". Any other value will be
ignored.
String v = value.trim();
if (SYSTEM_OUT.equalsIgnoreCase(v)) {
target = SYSTEM_OUT;
} else if (SYSTEM_ERR.equalsIgnoreCase(v)) {
target = SYSTEM_ERR;
} else {
targetWarn(value);
}
|
void | targetWarn(java.lang.String val)
LogLog.warn("["+val+"] should be System.out or System.err.");
LogLog.warn("Using previously set target, System.out by default.");
|