sonatype-lift[bot] commented on code in PR #1501:
URL: https://github.com/apache/solr/pull/1501#discussion_r1152023909


##########
solr/core/src/java/org/apache/solr/logging/jul/JulWatcher.java:
##########
@@ -157,7 +158,9 @@ public SolrDocument toSolrDocument(LogRecord event) {
     doc.setField("message", event.getMessage().toString());
     Throwable t = event.getThrown();
     if (t != null) {
-      doc.setField("trace", Throwables.getStackTraceAsString(t));
+      StringWriter trace = new StringWriter();
+      t.printStackTrace(new PrintWriter(trace));

Review Comment:
   I've recorded this as ignored for this pull request.
   If you change your mind, just comment `@sonatype-lift unignore`.



##########
solr/core/src/java/org/apache/solr/logging/log4j2/Log4j2Watcher.java:
##########
@@ -272,7 +273,11 @@ public SolrDocument toSolrDocument(LogEvent event) {
     Message message = event.getMessage();
     doc.setField("message", message.getFormattedMessage());
     Throwable t = message.getThrowable();
-    if (t != null) doc.setField("trace", Throwables.getStackTraceAsString(t));
+    if (t != null) {
+      StringWriter trace = new StringWriter();
+      t.printStackTrace(new PrintWriter(trace));

Review Comment:
   I've recorded this as ignored for this pull request.
   If you change your mind, just comment `@sonatype-lift unignore`.



-- 
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]

Reply via email to