Class ProcessIdConverter

  • All Implemented Interfaces:
    ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.LifeCycle

    public class ProcessIdConverter
    extends ch.qos.logback.classic.pattern.ClassicConverter
    Can be used like this:
    
     <configuration>
         <conversionRule conversionWord="pid"
                         converterClass="com.xebialabs.xlrelease.logback.ProcessIdConverter" />
    
         <appender name="FILE" class="ch.qos.logback.core.FileAppender">
             <file>build/log/xl-release.log</file>
             <encoder>
                 <pattern>$-6pid %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] {%mdc} %-5level %logger{36} - %msg%n</pattern>
             </encoder>
         </appender>
         <!-- .... -->
      </configuration>
    
     
    see http://logback.qos.ch/manual/layouts.html
    • Field Summary

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

        started
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String convert​(ch.qos.logback.classic.spi.ILoggingEvent event)  
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProcessIdConverter

        public ProcessIdConverter()
    • Method Detail

      • convert

        public java.lang.String convert​(ch.qos.logback.classic.spi.ILoggingEvent event)
        Specified by:
        convert in class ch.qos.logback.core.pattern.Converter<ch.qos.logback.classic.spi.ILoggingEvent>