有没有办法使JBOSS中的stacktrace-能够包装在一行中

问题描述

我们正在为应用程序中的日志分析实现ELK堆栈。 我们已经配置了文件拍,以在启用多行选项的情况下(通过logstash)将日志推送到elasticsearch。 每当在我们的应用程序中调用e.printstacktrace时,日志就会如下记录,并且filebeat将它们作为单独的行推送。 (由于跟踪的每一行都附加了时间戳,因此无法将其识别为多行) 我们正在使用JBOSS EAP 7.2作为我们的应用服务器。

03:27:54,530 ERROR [stderr] (Thread-17970) Application Exception: ERROR,SYstem#T999#789,Exception While Initialising
03:27:54,530 ERROR [stderr] (Thread-17970)      at sun.reflect.GeneratedMethodAccessor71.invoke(UnkNown Source)
03:27:54,530 ERROR [stderr] (Thread-17970)      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
03:27:54,530 ERROR [stderr] (Thread-17970)      at java.lang.reflect.Method.invoke(Method.java:498)
03:27:54,530 ERROR [stderr] (Thread-17970)      at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)

有什么办法可以使跟踪打印出来?如下所示,其中捕获了很少的其他异常。 在此先感谢您,任何见解都会有很大帮助

14:01:29,531 ERROR [io.undertow.request] (default task-3#eBBS#VN#Default#NA#NA#NA#) UT005023: Exception handling request to /cba-api/rcb/api/v1/contact: java.lang.NullPointerException
        at cba.core.api.utility.RequestAndResponseLoggingFilter.doFilterWrapped(RequestAndResponseLoggingFilter.java:163) [classes:]
        at cba.core.api.utility.RequestAndResponseLoggingFilter.doFilterInternal(RequestAndResponseLoggingFilter.java:79) [classes:]

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)