panbingkun commented on code in PR #45808:
URL: https://github.com/apache/spark/pull/45808#discussion_r1547089486
##########
common/utils/src/main/scala/org/apache/spark/internal/Logging.scala:
##########
@@ -29,14 +29,15 @@ import org.apache.logging.log4j.core.filter.AbstractFilter
import org.slf4j.{Logger, LoggerFactory}
import org.apache.spark.internal.Logging.SparkShellLoggingFilter
+import org.apache.spark.internal.LogKey.LogKey
import org.apache.spark.util.SparkClassUtils
/**
* Mapped Diagnostic Context (MDC) that will be used in log messages.
* The values of the MDC will be inline in the log message, while the
key-value pairs will be
* part of the ThreadContext.
*/
-case class MDC(key: LogKey.Value, value: String)
+case class MDC(key: LogKey, value: Any)
Review Comment:
Make the `type` of `value` from `String` to `Any`, so that when using `MDC`,
some code can be `omitted`, eg: `String.valueOf(...)` , `x.toString`
--
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]