我想以 json 格式接收日志消息。而且我还需要将以空格开头的日志(在同一封电子邮件中发送堆栈跟踪)与以前找到的日志合并。
从官方网站文档中,第一个作业所需的编解码器是“json”。而对于第二个工作,所需的编解码器是“多行”。
如何同时完成这两项工作?
这是一个示例日志
2014-06-17 14:47:22,490 DEBUG [-] com.tigerit.evr.util.EvrAuthManager (EvrAuthManager.java:61) - User details are good and ready to go
这是一个示例堆栈跟踪 -
com.bea.core.repackaged.springframework.beans.factory.BeanCreationException: Dependency injection failure: can't find the bean definition about class interface javax.jms.Queue; nested exception is com.bea.core.repackaged.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [javax.jms.Queue] is defined: No beans of type javax.jms.Queue; owner=com.bea.core.repackaged.springframework.context.support.GenericApplicationContext@1364679d: display name [com.bea.core.repackaged.springframework.context.support.GenericApplicationContext@1364679d]; startup date [Wed Jun 18 10:10:36 BDT 2014]; parent: com.bea.core.repackaged.springframework.context.support.GenericApplicationContext@61932006
at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.applyInjections(Jsr250Metadata.java:244)
at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.inject(Jsr250Metadata.java:226)
at com.bea.core.repackaged.springframework.jee.spi.EjbComponentCreatorBrokerImpl.injection(EjbComponentCreatorBrokerImpl.java:112)
at com.bea.core.repackaged.springframework.jee.spi.EjbComponentCreatorBrokerImpl.getBean(EjbComponentCreatorBrokerImpl.java:70)
at weblogic.ejb.container.injection.EjbComponentCreatorImpl.getBean(EjbComponentCreatorImpl.java:68)
at weblogic.ejb.container.manager.BaseEJBManager.createNewBeanInstance(BaseEJBManager.java:216)
我想添加以“at”开头的行以与之前的日志消息合并。