Class NodeNamePatternConverter

  • All Implemented Interfaces:

    public final class NodeNamePatternConverter
    extends org.apache.logging.log4j.core.pattern.LogEventPatternConverter
    Converts %node_name in log4j patterns into the current node name. We can't use a system property for this because the node name system property is only set if the node name is explicitly defined in elasticsearch.yml.
    • Field Summary

      • Fields inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter

      • Fields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void format​(org.apache.logging.log4j.core.LogEvent event, java.lang.StringBuilder toAppendTo)  
      static NodeNamePatternConverter newInstance​(java.lang.String[] options)
      Called by log4j2 to initialize this converter.
      • Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter

        format, handlesThrowable, isVariable
      • Methods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter

        getName, getStyleClass
      • Methods inherited from class java.lang.Object

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

      • newInstance

        public static NodeNamePatternConverter newInstance​(java.lang.String[] options)
        Called by log4j2 to initialize this converter.
      • format

        public void format​(org.apache.logging.log4j.core.LogEvent event,
                           java.lang.StringBuilder toAppendTo)
        Specified by:
        format in class org.apache.logging.log4j.core.pattern.LogEventPatternConverter