You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/01/15 15:46:16 UTC

[GitHub] [logging-log4j2] vy opened a new pull request #458: LOG4J2-2993 Support stack trace truncation in JsonTemplateLayout.

vy opened a new pull request #458:
URL: https://github.com/apache/logging-log4j2/pull/458


   


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



[GitHub] [logging-log4j2] vy merged pull request #458: LOG4J2-2993 Support stack trace truncation in JsonTemplateLayout.

Posted by GitBox <gi...@apache.org>.
vy merged pull request #458:
URL: https://github.com/apache/logging-log4j2/pull/458


   


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



[GitHub] [logging-log4j2] vy merged pull request #458: LOG4J2-2993 Support stack trace truncation in JsonTemplateLayout.

Posted by GitBox <gi...@apache.org>.
vy merged pull request #458:
URL: https://github.com/apache/logging-log4j2/pull/458


   


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



[GitHub] [logging-log4j2] ronosaurus commented on a change in pull request #458: LOG4J2-2993 Support stack trace truncation in JsonTemplateLayout.

Posted by GitBox <gi...@apache.org>.
ronosaurus commented on a change in pull request #458:
URL: https://github.com/apache/logging-log4j2/pull/458#discussion_r559265163



##########
File path: src/site/asciidoc/manual/json-template-layout.adoc.vm
##########
@@ -476,20 +499,35 @@ Resolve the stack trace into a string field:
 {
   "$resolver": "exception",
   "field": "stackTrace",
-  "stringified": true
+  "stackTrace": {
+    "stringified": true
+  }
 }
 ----
 
-| exceptionRootCause
-| identical to `exception` resolver
-a|
-Resolves the fields of the innermost `Throwable` returned by
-`logEvent.getThrown()`.
+Resolve the stack trace into a string field such that the content will be
+truncated by the given points:
 
-Note that this resolver is toggled by
-`log4j.layout.jsonTemplate.stackTraceEnabled` property.
+[source,json]
+----
+{
+  "$resolver": "exception",
+  "field": "stackTrace",
+  "stackTrace": {
+    "stringified": true,
+    "truncatedStringSuffix": ">",
+    "truncationPointStrings": ["at javax.servlet.http.HttpServlet.service"]

Review comment:
       I replied to the dev list but the formatting was bad so I'm following up here. Looks like a typo:
   
   ```
   "truncationPointMatcherStrings": ["at javax.servlet.http.HttpServlet.service"]
   ```
   
   




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



[GitHub] [logging-log4j2] vy commented on a change in pull request #458: LOG4J2-2993 Support stack trace truncation in JsonTemplateLayout.

Posted by GitBox <gi...@apache.org>.
vy commented on a change in pull request #458:
URL: https://github.com/apache/logging-log4j2/pull/458#discussion_r559766184



##########
File path: src/site/asciidoc/manual/json-template-layout.adoc.vm
##########
@@ -476,20 +499,35 @@ Resolve the stack trace into a string field:
 {
   "$resolver": "exception",
   "field": "stackTrace",
-  "stringified": true
+  "stackTrace": {
+    "stringified": true
+  }
 }
 ----
 
-| exceptionRootCause
-| identical to `exception` resolver
-a|
-Resolves the fields of the innermost `Throwable` returned by
-`logEvent.getThrown()`.
+Resolve the stack trace into a string field such that the content will be
+truncated by the given points:
 
-Note that this resolver is toggled by
-`log4j.layout.jsonTemplate.stackTraceEnabled` property.
+[source,json]
+----
+{
+  "$resolver": "exception",
+  "field": "stackTrace",
+  "stackTrace": {
+    "stringified": true,
+    "truncatedStringSuffix": ">",
+    "truncationPointStrings": ["at javax.servlet.http.HttpServlet.service"]

Review comment:
       Sharp catch! Fixed.




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