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

Gengliang Wang resolved SPARK-49216.
------------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Issue resolved by pull request 47732
[https://github.com/apache/spark/pull/47732]

> 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
>             Fix For: 4.0.0
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to