Class AbstractFixedNameFieldMapper<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.util.Optional<T> getValue​(ch.qos.logback.classic.spi.ILoggingEvent event)  
      void mapField​(ch.qos.logback.classic.spi.ILoggingEvent event, java.util.function.BiConsumer<java.lang.String,​T> valueHandler)
      Map a field (one or more) from ILoggingEvent to a GELF message.
      • Methods inherited from class java.lang.Object

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

      • AbstractFixedNameFieldMapper

        protected AbstractFixedNameFieldMapper​(java.lang.String fieldName)
    • Method Detail

      • mapField

        public void mapField​(ch.qos.logback.classic.spi.ILoggingEvent event,
                             java.util.function.BiConsumer<java.lang.String,​T> valueHandler)
        Description copied from interface: GelfFieldMapper
        Map a field (one or more) from ILoggingEvent to a GELF message.
        Specified by:
        mapField in interface GelfFieldMapper<T>
        Parameters:
        event - the source log event
        valueHandler - the consumer of the field (String name and value)
      • getValue

        protected abstract java.util.Optional<T> getValue​(ch.qos.logback.classic.spi.ILoggingEvent event)