gengliangwang commented on code in PR #45808:
URL: https://github.com/apache/spark/pull/45808#discussion_r1548242096


##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala:
##########
@@ -854,7 +856,8 @@ private[spark] class ApplicationMaster(
             logInfo(s"Driver terminated or disconnected! Shutting down. 
$remoteAddress")
             finish(FinalApplicationStatus.SUCCEEDED, 
ApplicationMaster.EXIT_SUCCESS)
           } else {
-            logError(s"Driver terminated with exit code ${exitCode}! Shutting 
down. $remoteAddress")
+            logError(log"Driver terminated with exit code ${MDC(EXIT_CODE, 
exitCode)}! " +
+              log"Shutting down. ${MDC(REMOTE_ADDRESS, remoteAddress)}")

Review Comment:
   @panbingkun Let's put all the variables into the context during the 
migration. If the context is too verbose, we can configure log4j to only show a 
subset of keys later.
   Otherwise, there will be back-and-forth during the migration. 
`remoteAddress` can be helpful for debugging here.



-- 
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]

Reply via email to