Class ProgressAwareConsoleAppender<E>

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.UnsynchronizedAppenderBase<E>
es.urjc.etsii.grafo.terminal.ProgressAwareConsoleAppender<E>
Type Parameters:
E - log event type
All Implemented Interfaces:
ch.qos.logback.core.Appender<E>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.FilterAttachable<E>, ch.qos.logback.core.spi.LifeCycle

public class ProgressAwareConsoleAppender<E> extends ch.qos.logback.core.UnsynchronizedAppenderBase<E>
Logback console appender that preserves the active progress bar line.
  • Field Summary

    Fields inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase

    name, started

    Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

    context
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    append(E eventObject)
     
    ch.qos.logback.core.encoder.Encoder<E>
     
    Returns the current console target.
    protected OutputStream
     
    void
    setEncoder(ch.qos.logback.core.encoder.Encoder<E> encoder)
     
    void
    Sets the console target.
    void
     
    void
     

    Methods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase

    addFilter, buildReentryGuard, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString

    Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface ch.qos.logback.core.spi.ContextAware

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
  • Constructor Details

    • ProgressAwareConsoleAppender

      public ProgressAwareConsoleAppender()
  • Method Details

    • setTarget

      public void setTarget(String value)
      Sets the console target. Recognized values are System.out and System.err.
      Parameters:
      value - console target name
    • getTarget

      public String getTarget()
      Returns the current console target.
      Returns:
      target name
    • start

      public void start()
      Specified by:
      start in interface ch.qos.logback.core.spi.LifeCycle
      Overrides:
      start in class ch.qos.logback.core.UnsynchronizedAppenderBase<E>
    • resolveTargetStream

      protected OutputStream resolveTargetStream()
    • append

      protected void append(E eventObject)
      Specified by:
      append in class ch.qos.logback.core.UnsynchronizedAppenderBase<E>
    • stop

      public void stop()
      Specified by:
      stop in interface ch.qos.logback.core.spi.LifeCycle
      Overrides:
      stop in class ch.qos.logback.core.UnsynchronizedAppenderBase<E>
    • getEncoder

      public ch.qos.logback.core.encoder.Encoder<E> getEncoder()
    • setEncoder

      public void setEncoder(ch.qos.logback.core.encoder.Encoder<E> encoder)