gengliangwang commented on code in PR #45926: URL: https://github.com/apache/spark/pull/45926#discussion_r1558922175
########## sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala: ########## @@ -58,9 +59,12 @@ private[hive] class SparkGetColumnsOperation( override def runInternal(): Unit = { // Do not change cmdStr. It's used for Hive auditing and authorization. - val cmdStr = s"catalog : $catalogName, schemaPattern : $schemaName, tablePattern : $tableName" - val logMsg = s"Listing columns '$cmdStr, columnName : $columnName'" - logInfo(s"$logMsg with $statementId") + val cmdStr = log"catalog : ${MDC(CATALOG_NAME, catalogName)}, " + + log"schemaPattern : ${MDC(SCHEMA_NAME, schemaName)}, " + + log"tablePattern : ${MDC(TABLE_NAME, tableName)}" + val logMsg = log"Listing columns '${MDC(COMMAND, cmdStr)}, " + + log"columnName : ${MDC(COLUMN_NAME, columnName)}'" + logInfo(log"${MDC(LOG_MESSAGE, logMsg)} with ${MDC(STATEMENT_ID, statementId)}") Review Comment: This is wrong...let's flatten eveything into one log entry instead of nested logs. -- 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