org.springframework.boot.logging.logback

Class ColorConverter

  • java.lang.Object
    • ch.qos.logback.core.pattern.Converter<E>
      • ch.qos.logback.core.pattern.FormattingConverter<E>
        • ch.qos.logback.core.pattern.DynamicConverter<E>
          • ch.qos.logback.core.pattern.CompositeConverter<ch.qos.logback.classic.spi.ILoggingEvent>
            • org.springframework.boot.logging.logback.ColorConverter
  • All Implemented Interfaces:
    ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.LifeCycle


    public class ColorConverter
    extends ch.qos.logback.core.pattern.CompositeConverter<ch.qos.logback.classic.spi.ILoggingEvent>
    Logback CompositeConverter colors output using the AnsiOutput class. A single 'color' option can be provided to the converter, or if not specified color will be picked based on the logging level.
    Author:
    Phillip Webb
    • Field Summary

      • Fields inherited from class ch.qos.logback.core.pattern.DynamicConverter

        started
    • Constructor Summary

      Constructors 
      Constructor and Description
      ColorConverter() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      protected String toAnsiString(String in, AnsiElement element) 
      protected String transform(ch.qos.logback.classic.spi.ILoggingEvent event, String in) 
      • Methods inherited from class ch.qos.logback.core.pattern.CompositeConverter

        convert, getChildConverter, setChildConverter, toString
      • Methods inherited from class ch.qos.logback.core.pattern.DynamicConverter

        addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getFirstOption, getOptionList, isStarted, setContext, setOptionList, start, stop
      • Methods inherited from class ch.qos.logback.core.pattern.FormattingConverter

        getFormattingInfo, setFormattingInfo, write
      • Methods inherited from class ch.qos.logback.core.pattern.Converter

        getNext, setNext
    • Constructor Detail

      • ColorConverter

        public ColorConverter()
    • Method Detail

      • transform

        protected String transform(ch.qos.logback.classic.spi.ILoggingEvent event,
                                   String in)
        Specified by:
        transform in class ch.qos.logback.core.pattern.CompositeConverter<ch.qos.logback.classic.spi.ILoggingEvent>