Package org.elasticsearch.common.logging
Class NodeNamePatternConverter
java.lang.Object
org.apache.logging.log4j.core.pattern.AbstractPatternConverter
org.apache.logging.log4j.core.pattern.LogEventPatternConverter
org.elasticsearch.common.logging.NodeNamePatternConverter
- All Implemented Interfaces:
org.apache.logging.log4j.core.pattern.PatternConverter
@Plugin(category="Converter",
name="NodeNamePatternConverter")
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
LOGGER
Fields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter
CATEGORY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
format(org.apache.logging.log4j.core.LogEvent event, StringBuilder toAppendTo)
static NodeNamePatternConverter
newInstance(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
-
Method Details
-
newInstance
Called by log4j2 to initialize this converter. -
format
- Specified by:
format
in classorg.apache.logging.log4j.core.pattern.LogEventPatternConverter
-