fluent-plugin-concat icon indicating copy to clipboard operation
fluent-plugin-concat copied to clipboard

Java multi-line logs merge into one line

Open xianhuadezhuren opened this issue 2 years ago • 1 comments

Problem

Hello, when I collect java error logs, multiple lines are merged into one line. No matter how I configure it, kibana displays two lines. ...

[oksa-center:10.200.1.60:8061] 2023-05-17 17:07:57.799 ERROR 1 [cb891261eb664bca] [http-nio-8061-exec-9] com.neo.oksa.global.GlobalExceptionHandler ERRORMESSAGE 服务器未知异常,请求地址:/customer/validateStaff

java.lang.RuntimeException: Required String parameter 'staffCode' is not present at com.neo.feign.handler.FeignExceptionDecoder.parseException(FeignExceptionDecoder.java:61) at com.neo.feign.handler.FeignExceptionDecoder.decode(FeignExceptionDecoder.java:36) at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) at com.sun.proxy.$Proxy217.getByStaffCode(Unknown Source) at com.neo.oksa.service.impl.CustomerServiceImpl.validateStaff(CustomerServiceImpl.java:461) at com.neo.oksa.controller.CustomerController.validateStaff$original$b7UqmD2f(CustomerController.java:154) at com.neo.oksa.controller.CustomerController.validateStaff$original$b7UqmD2f$accessor$bK9pJlec(CustomerController.java) at com.neo.oksa.controller.CustomerController$auxiliary$JNrrwJhu.call(Unknown Source) at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:86) at com.neo.oksa.controller.CustomerController.validateStaff(CustomerController.java) at com.neo.oksa.controller.CustomerController$$FastClassBySpringCGLIB$$a8c94dc1.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)

Steps to replicate

... <filter **> @type concat key message format_firstline /^[/ continuous_line_regexp /Caused\sby:|\s+at\s.*|^java|\s+ ... (\d)+ more/ multiline_end_regexp /^at/ separator "" flush_interval 5s ...

Expected Behavior

i want to collect the above logs into one line of output ...

Your environment

  • OS version
  • paste result of fluentd --version or td-agent --version
  • plugin version
    • paste boot log of fluentd or td-agent
    • paste result of fluent-gem list, td-agent-gem list or your Gemfile.lock

xianhuadezhuren avatar May 17 '23 09:05 xianhuadezhuren

hi @xianhuadezhuren :) Did u find any solution in the meantime? I see that this feature works on the current version of the plugin only if a well defined number of lines is specified

valentinacala avatar Aug 08 '23 06:08 valentinacala