You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2024/08/13 21:33:00 UTC

[jira] [Assigned] (SPARK-49216) Fix to not log message context with explicitly LogEntry constructed when Structured Logging conf is off

     [ https://issues.apache.org/jira/browse/SPARK-49216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gengliang Wang reassigned SPARK-49216:
--------------------------------------

    Assignee: Xinyi Yu

> Fix to not log message context with explicitly LogEntry constructed when Structured Logging conf is off
> -------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-49216
>                 URL: https://issues.apache.org/jira/browse/SPARK-49216
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Spark Core
>    Affects Versions: 4.0.0
>            Reporter: Xinyi Yu
>            Assignee: Xinyi Yu
>            Priority: Major
>              Labels: pull-request-available
>
> To use structured logging developers usually do
> {code:java}
> logInfo(log"Lost executor ${MDC(LogKeys.EXECUTOR_ID, "1")}."), {code}
> When the structured logging conf is off, the context is not logged.
> However if explicitly constructing the LogEntry and calling the public API,
> {code:java}
> logInfo(
>   MessageWithContext(
>     "Lost executor 1.",
>     new java.util.HashMap[String, String] { put(LogKeys.EXECUTOR_ID.name, "1") }
>   )
> ) {code}
> the conf does not take effect and even when it is off, the context is still logged.
> The behavior should be fixed.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org