gengliangwang commented on code in PR #45990: URL: https://github.com/apache/spark/pull/45990#discussion_r1566492674
########## common/utils/src/main/scala/org/apache/spark/internal/Logging.scala: ########## @@ -153,10 +153,42 @@ trait Logging { if (log.isDebugEnabled) log.debug(msg) } + protected def logDebug(entry: LogEntry): Unit = { + if (log.isDebugEnabled) { + withLogContext(entry.context) { + log.debug(entry.message) + } + } + } + + protected def logDebug(entry: LogEntry, throwable: Throwable): Unit = { Review Comment: Let's skip this one if it is no needed ########## common/utils/src/main/scala/org/apache/spark/internal/Logging.scala: ########## @@ -153,10 +153,42 @@ trait Logging { if (log.isDebugEnabled) log.debug(msg) } + protected def logDebug(entry: LogEntry): Unit = { + if (log.isDebugEnabled) { + withLogContext(entry.context) { + log.debug(entry.message) + } + } + } + + protected def logDebug(entry: LogEntry, throwable: Throwable): Unit = { + if (log.isDebugEnabled) { + withLogContext(entry.context) { + log.debug(entry.message, throwable) + } + } + } + protected def logTrace(msg: => String): Unit = { if (log.isTraceEnabled) log.trace(msg) } + protected def logTrace(entry: LogEntry): Unit = { + if (log.isTraceEnabled) { + withLogContext(entry.context) { + log.trace(entry.message) + } + } + } + + protected def logTrace(entry: LogEntry, throwable: Throwable): Unit = { Review Comment: ditto -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org