glasser commented on issue #12054:
URL: https://github.com/apache/druid/issues/12054#issuecomment-991343989
One thing that's challenging about the PatternLayout recommendation
(especially as a non-log4j2-expert) is understanding if paths that don't use
PatternLayout at all are safe or not. For example, our log4j2.xml looks in
part like:
```
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<JsonLayout
complete="false"
compact="true"
eventEol="true"
properties="true"
/>
</Console>
<RollingRandomAccessFile name="Server"
fileName="/tmp/server.${sys:druid.plaintextPort:-0}.log"
filePattern="/tmp/server.${sys:druid.plaintextPort:-0}.%i.log.gz">
<PatternLayout pattern="%d{ISO8601} %p [%t] %c - %m%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingRandomAccessFile>
</Appenders>
```
I can see that we can add the `%m` thing to the PatternLayout inside
RollingRandomAccessFile. We don't use PatternLayout inside Console, though —
we use JsonLayout. Does that mean that the Console part of our configuration is
safe because the *problem* is PatternLayout-specific, or that this part of our
configuration is broken and there's no way to fix it?
(This level of complexity is why we would appreciate a backport if feasible,
though we can probably also just do our own build of "0.21.1 + #12051" for now.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]