Class StackTraceLogParser


  • public class StackTraceLogParser
    extends Object
    Parses XWiki log formats and aggregates stack traces. For example the following:
    
     2019-05-06 20:02:37,331 [Exec Stream Pumper] - 2019-05-06 20:02:37,330
       [http://localhost:8080/xwiki/webjars/wiki%3Axwiki/jstree/3.3.7/jstree.min.js]
         ERROR ebJarsResourceReferenceHandler - Failed to read resource [jstree/3.3.7/jstree.min.js]
     2019-05-06 20:02:37,331 [Exec Stream Pumper] - org.xwiki.resource.ResourceReferenceHandlerException:
       Failed to read resource [jstree/3.3.7/jstree.min.js]
     2019-05-06 20:02:37,331 [Exec Stream Pumper] -  at
       org.xwiki.resource.servlet.AbstractServletResourceReferenceHandler.serveResource(AbstractServlet...
     ...
     2019-05-06 20:02:37,352 [Exec Stream Pumper] - Caused by: org.eclipse.jetty.io.EofException: null
     ...
     2019-05-06 20:02:37,359 [Exec Stream Pumper] -  ... 75 common frames omitted
     
    Will return a line of:
    
     2019-05-06 20:02:37,331 [Exec Stream Pumper] - 2019-05-06 20:02:37,330
       [http://localhost:8080/xwiki/webjars/wiki%3Axwiki/jstree/3.3.7/jstree.min.js]
         ERROR ebJarsResourceReferenceHandler - Failed to read resource [jstree/3.3.7/jstree.min.js]
     org.xwiki.resource.ResourceReferenceHandlerException: Failed to read resource [jstree/3.3.7/jstree.min.js]
     Caused by: org.eclipse.jetty.io.EofException: null
     
    Since:
    11.4RC1
    Version:
    $Id: 9092bf9f604015c7e451f7595cec857786717329 $
    • Constructor Detail

      • StackTraceLogParser

        public StackTraceLogParser()
    • Method Detail

      • parse

        public List<String> parse​(String logContent)
        Parameters:
        logContent - the stack trace to parse
        Returns:
        the lines of the log with stack traces aggregated into a single line containing all the "caused by"