elk的好处,我就不用说明了,部署的话可以参考
然后日志的常规格式方式,我也不做说明了,请看这里
所以我们来讲讲非常规的日志格式,因为项目过程,肯定会有一个整体格式,像那种常规的的解析方式的话,我们可能就处理不了
如
[接口调用] [开始时间 1614073281781] [接口 TestController-getAreaChildList] [参数 [AreaChildListBo(countryId=demoData, parentId=demoData),]] [异常 系统异常] [异常编码 Exception] [异常描述 Exception : -at com.zyd.zydiot.base.controller.TestController.getAreaChildList(TestController.java:22) -at com.zyd.zydiot.base.controller.TestController$$FastClassBySpringCGLIB$$359ad4f2.invoke(<generated>) -at com.zyd.zydiot.zyd_common.config.log.InterfaceLogConfig.log(InterfaceLogConfig.java:62) -at com.zyd.zydiot.base.controller.TestController$$EnhancerBySpringCGLIB$$3f3e8ce7.getAreaChildList(<generated>)] [耗时 1] [IP: 127.0.0.1] [