ch.qos.logback.core
Class ConsoleAppender<E>
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.UnsynchronizedAppenderBase<E>
ch.qos.logback.core.OutputStreamAppender<E>
ch.qos.logback.core.ConsoleAppender<E>
- All Implemented Interfaces:
- Appender<E>, ContextAware, FilterAttachable<E>, LifeCycle
public class ConsoleAppender<E>
- extends OutputStreamAppender<E>
ConsoleAppender appends log events to System.out
or
System.err
using a layout specified by the user. The default
target is System.out
.
For more information about this appender, please refer to the online manual
at http://logback.qos.ch/manual/appenders.html#ConsoleAppender
- Author:
- Ceki Gülcü, Tom SH Liu, Ruediger Dohna
Method Summary |
String |
getTarget()
Returns the current value of the target property. |
void |
setTarget(String value)
Sets the value of the Target option. |
void |
start()
Checks that requires parameters are set and if everything is in order,
activates this appender. |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
target
protected ConsoleTarget target
ConsoleAppender
public ConsoleAppender()
setTarget
public void setTarget(String value)
- Sets the value of the Target option. Recognized values are
"System.out" and "System.err". Any other value will be ignored.
getTarget
public String getTarget()
- Returns the current value of the target property. The default value
of the option is "System.out".
See also
setTarget(java.lang.String)
.
start
public void start()
- Description copied from class:
OutputStreamAppender
- Checks that requires parameters are set and if everything is in order,
activates this appender.
- Specified by:
start
in interface LifeCycle
- Overrides:
start
in class OutputStreamAppender<E>
Copyright © 2005-2012 QOS.ch. All Rights Reserved.