Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcheng15 committed Sep 5, 2022
1 parent 88aee60 commit f99fbdd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class TableStructureTest extends BaseTest with Logging {
val root = suggester.sqlAST
root.visitDown(0) { case (ast, level) =>
if (log.isInfoEnabled()) {
log.info(s"${ast.name(suggester.tokens)} ${ast.output(suggester.tokens)}")
log.info("{} {}", ast.name(suggester.tokens), ast.output(suggester.tokens))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ object PSExecutorBackend {
argv = tail
case item::value::tail if item.startsWith("--")=>
if (log.isInfoEnabled()) {
log.info(s"ignore options: ${item} ${value}--")
log.info("ignore options: {} {}--", item, value)
}
argv = tail

case Nil =>
case tail =>
if (log.isInfoEnabled()) {
log.info(s"Unrecognized options: ${tail.mkString(" ")}")
log.info("Unrecognized options: {}", tail.mkString(" "))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ object TestManager extends Logging {

def recordError(testCase: TestCase, msg: String): Unit = {
failedCases += Tuple2(testCase, msg)
logError("========================= Error Test Case =========================")
logError(s"Error: TestCase ${testCase.name} failed, error msg is: $msg")
log.error("========================= Error Test Case =========================")
log.error("Error: TestCase {} failed, error msg is: {}", testCase.name, msg)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ object SQLTokenAnalysis {
parser.getClass.getMethod("parseStr", classOf[String]).invoke(parser, content)
} catch {
case e: Exception =>
log.error(s"Parser Invoke Error: {}\n Exception: {}", content, e)
log.error("Parser Invoke Error: {}\n Exception: {}", content, e)
throw e
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ object DoubleFeature extends BaseFeatureFunctions {
val max = trainParams.getOrElse("max", "1").toDouble
val scaleRange = max - min
if (log.isInfoEnabled()) {
log.info(s"predict: ${originalRange.mkString(",")} ${minArray.mkString(",")} ${scaleRange} $min")
log.info("predict: {} {} {} {}", originalRange.mkString(","), minArray.mkString(","), scaleRange, min)
}
minMaxFunc(originalRange, minArray, scaleRange, min)

Expand Down Expand Up @@ -186,7 +186,7 @@ object DoubleFeature extends BaseFeatureFunctions {
val scaleRange = max - min

if (log.isInfoEnabled()) {
log.info(s"train: ${originalRange.mkString(",")} ${minArray.mkString(",")} ${scaleRange} $min")
log.info("train: {} {} {} {}", originalRange.mkString(","), minArray.mkString(","), scaleRange, min)
}
minMaxFunc(originalRange, minArray, scaleRange, min)

Expand Down

0 comments on commit f99fbdd

Please sign in to comment.