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
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
-
Field Summary
FieldsFields inherited from class ch.qos.logback.core.OutputStreamAppender
encoder, streamWriteLockFields inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase
name, startedFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the current value of the target property.booleanvoidSets the value of the Target option.voidsetWithJansi(boolean withJansi) If true, this appender will output to a stream provided by the JANSI library.voidstart()Checks that requires parameters are set and if everything is in order, activates this appender.Methods inherited from class ch.qos.logback.core.OutputStreamAppender
append, closeOutputStream, getEncoder, getOutputStream, isImmediateFlush, setEncoder, setImmediateFlush, setLayout, setOutputStream, stop, subAppend, updateByteCount, writeByteArrayToOutputStreamWithPossibleFlush, writeOutMethods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Field Details
-
target
-
withJansi
-
-
Constructor Details
-
ConsoleAppender
public ConsoleAppender()
-
-
Method Details
-
setTarget
-
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
Description copied from class:OutputStreamAppenderChecks that requires parameters are set and if everything is in order, activates this appender.- Specified by:
startin interfaceLifeCycle- Overrides:
startin classOutputStreamAppender<E>
-
isWithJansi
- Returns:
- whether to use JANSI or not.
-
setWithJansi
If true, this appender will output to a stream provided by the JANSI library.- Parameters:
withJansi- whether to use JANSI or not.- Since:
- 1.0.5
-