You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/26 18:52:05 UTC

[GitHub] [spark] srowen commented on a change in pull request #24684: [SPARK-27657][ML]Fix the log format of ml.util.Instrumentation.logFai…

srowen commented on a change in pull request #24684: [SPARK-27657][ML]Fix the log format of ml.util.Instrumentation.logFai…
URL: https://github.com/apache/spark/pull/24684#discussion_r287609978
 
 

 ##########
 File path: mllib/src/main/scala/org/apache/spark/ml/util/Instrumentation.scala
 ##########
 @@ -161,8 +162,9 @@ private[spark] class Instrumentation private () extends Logging with MLEvents {
    * Logs an exception raised during a training session.
    */
   def logFailure(e: Throwable): Unit = {
-    val msg = e.getStackTrace.mkString("\n")
-    super.logError(msg)
+    val msg = new StringWriter()
+    e.printStackTrace(new PrintWriter(msg))
+    super.logError(msg.toString)
 
 Review comment:
   I'm not clear what the change is... is it indentation? then I agree. Where else do we have the same issue?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org