标签:就是 bak https 参考 class linu 没有 日志格式 code
目前因发生了异常大概记得发生的时间段,想查看这个时间段的日志
1:09:59.946 [http-nio-12129-exec-10] INFO ntroller start ==== 11:09:59.946 [http-nio-12129-exec-10] INFO .BannerInfoService - ===== getBannerInfoList start========== 11:09:59.947 [http-nio-12129-exec-10] INFO vice.BannerInfoService - ===== getBannerInfoList end========== 11:09:59.947 [http-nio-12129-exec-10] INFO .controller.DriverBaseController - ==== GetBannerInfoController end ==== 11:09:59.947 [http-nio-12129-exec-10] INFO er.a
注意的部分:
1) . 开始时间和结束时间必须是日志里面有的,要是没有开始的时间,那就是查找没有结果,要是没有结束时间,查询的结果就是开始时间到最后的全部日志
2). 时间后面的p不能省略
$ sed -n ‘/11:10:*/,/11:20*/p‘ dongfeng-driver-core.2019-10-25.log | grep 超时 11:10:20.895 [http-nio-12129-exec-2] INFO allFeign - feign response body : HttpCommandResultWithData{data=null} CommonResult{resultCode=408, message=‘请求超时‘} 11:10:20.896 [http-nio-12129-exec-2] INFO cAop - RESPONSE : HttpCommandResultWithData{data=null} CommonResult{resultCode=408, message=‘请求超时‘} 11:16:26.696 [http-nio-12129-exec-1] INFO coForCallFeign - feign response body : HttpCommandResultWithData{data=null} CommonResult{resultCode=408, message=‘请求超时
total 31172
-rw-rw-r-- 1 prodfcv1 prodfcv1 14608 Oct 25 11:35 11.txt
drwxrwxr-x 2 prodfcv1 prodfcv1 6 May 6 2018 baklog
参考博客:https://www.cnblogs.com/yoyoketang/p/11729966.html
标签:就是 bak https 参考 class linu 没有 日志格式 code
原文地址:https://www.cnblogs.com/jiyanjiao-702521/p/11737235.html