You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Jerry Meng (JIRA)" <ji...@apache.org> on 2016/12/23 02:38:58 UTC
[jira] [Created] (LOG4J2-1749) YAML configuration ignores Flume
appender attribute 'type'
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org