Log4j2 - Error processing element Appender
In Log4j 2 the type of appender is specified in the name of the element, not with a type
attribute.
In other words, replace lines such as
<Appender type="Console" name="STDOUT">
and
<Appender type="File" name="File" fileName="${filename}">
with
<Console name="STDOUT">
and
<File name="File" fileName="${filename}">
See also the Log4j 2 documentation on appenders.
In my case it was wrong element name
<Appenders>
<RollingRandomAccessFileAppender name="stdout" fileName="../logs/app.log" filePattern="../logs/app.%d{yyMMdd}.%i.log.gz">
...
Correct one is
<Appenders>
<RollingRandomAccessFile name="stdout" fileName="../logs/app.log" filePattern="../logs/app.%d{yyMMdd}.%i.log.gz">
...