You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Volkan Yazici (Jira)" <ji...@apache.org> on 2023/04/24 07:46:00 UTC

[jira] [Commented] (LOG4J2-3660) PatternLayout %notEmpty should consider an MDC with no keys as empty

    [ https://issues.apache.org/jira/browse/LOG4J2-3660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17715625#comment-17715625 ] 

Volkan Yazici commented on LOG4J2-3660:
---------------------------------------

[~ndimiduk], thanks so much for the report. I have committed a fix, though [CI is dragging feet|https://github.com/apache/logging-log4j2/actions/runs/4780048439] to not upload a {{SNAPSHOT}} artifact to Nexus. I will let you know when it succeeds, so you can give it a roll.

We would also appreciate it if you report next time to [GitHub Issues|https://github.com/apache/logging-log4j2/issues], which is the default issue tracker as indicated in [our support page|https://logging.apache.org/log4j/2.x/support.html].

> PatternLayout %notEmpty should consider an MDC with no keys as empty
> --------------------------------------------------------------------
>
>                 Key: LOG4J2-3660
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3660
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts, Pattern Converters
>    Affects Versions: 2.17.2
>            Reporter: Nick Dimiduk
>            Assignee: Volkan Yazici
>            Priority: Major
>             Fix For: 2.21.0
>
>
> Introducing MDC logging over on HBASE-27762, we noticed an annoyance when writing a patter to ship by default. When the MDC contains no keys, {{%notEmpty}} still considers it as non-empty and renders as "{}". I expected that {{notEmpty}} would consider the absence of any keys in the MDC as an empty object.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)