Jerry Meng created LOG4J2-1749:
----------------------------------
Summary: YAML configuration ignores Flume appender attribute 'type'
Key: LOG4J2-1749
URL: https://issues.apache.org/jira/browse/LOG4J2-1749
Project: Log4j 2
Issue Type: Bug
Components: Core, Flume Appender
Affects Versions: 2.7
Reporter: Jerry Meng
I try to setup the Flume appender with type 'Persistent'
{code}
Flume:
name: foo
type: Persistent
compress: false
...
{code}
However, debug log always tells my FlumeAppender[type="null"...]
After tracking the code, I found at JsonConfiguration#processAttributes
line:237 (the super class of YamlConfiguration).
{code}
...
if (!entry.getKey().equalsIgnoreCase("type")) {
final JsonNode n = entry.getValue();
if (n.isValueNode()) {
attrs.put(entry.getKey(), n.asText());
}
}
..
{code}
While invoking processAttributes, the attribute 'type' will be filtered out.
I haven't dug out the reason and in what case the attribute 'type' needs to be
filtered out, but I think this might accidentally mass up appenders'
configuration.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]