linux 同时tail 多个文件并过滤多个关键字

多个文件   过滤多个关键字 或的关系

tail -f cdc-adapter/err_cdc-adapter.log cdc-admin/err_cdc-admin.log cdc-dpm/err_cdc-dpm.log cdc-extractor/err_cdc-extractor.log |grep -E '.log|ERROR'
复制代码
==> cdc-adapter/err_cdc-adapter.log <==
[2024-08-15 14:59:25.905] | [ERROR] | [PID=88574] | [http-nio-7007-exec-62] | [c.i.r.a.framework.util.ResourceUtils:38] | --> getValueByEnv()->error: No message found under code 'MAPPING_SQL queueFields error' for locale 'en_GB'.|
==> cdc-admin/err_cdc-adapter.log <==
[2024-08-15 14:58:12.972] | [ERROR] | [PID=84987] | [task-async1] | [c.i.c.a.d.s.impl.TableServiceImpl:1073] | --> [TRACE_ERROR]-[############START ==> (Map)ObjectMapperUtils.IGNORE_MAPPER.readValue {code=301002, message=admin repeat call table api(create type)., body=null, timestamp=2024-08-15T06:58:12.951166034Z}]|
[2024-08-15 14:58:12.972] | [ERROR] | [PID=84987] | [task-async1] | [c.i.c.a.d.s.impl.TableServiceImpl:1080] | --> [TRACE_ERROR]-[############ERROR ==> 调用repository失败,错误码 301002]|
[2024-08-15 14:58:12.983] | [ERROR] | [PID=84987] | [task-async1] | [c.i.c.a.d.s.impl.TableServiceImpl:1084] | --> [TRACE_ERROR]-[############START ==> 调用repository失败: {"timestamp":"2024-08-15T06:58:12.951166034Z","message":"admin repeat call table api(create type).","code":"301002","body":null}]|
[2024-08-15 14:58:43.002] | [ERROR] | [PID=84987] | [task-async2] | [c.i.c.a.d.s.impl.TableServiceImpl:1073] | --> [TRACE_ERROR]-[############START ==> (Map)ObjectMapperUtils.IGNORE_MAPPER.readValue {code=000000, message=successful., body=true, timestamp=2024-08-15T06:58:43.000012501Z}]|
[2024-08-15 14:58:51.644] | [ERROR] | [PID=84987] | [task-async4] | [c.i.c.a.d.s.impl.TableServiceImpl:1073] | --> [TRACE_ERROR]-[############START ==> (Map)ObjectMapperUtils.IGNORE_MAPPER.readValue {code=000000, message=successful., body=true, timestamp=2024-08-15T06:58:51.642146545Z}]|
[2024-08-15 14:58:55.679] | [ERROR] | [PID=84987] | [task-async6] | [c.i.c.a.d.s.impl.TableServiceImpl:1073] | --> [TRACE_ERROR]-[############START ==> (Map)ObjectMapperUtils.IGNORE_MAPPER.readValue {code=000000, message=successful., body=true, timestamp=2024-08-15T06:58:55.677771309Z}]|
[2024-08-15 14:59:00.729] | [ERROR] | [PID=84987] | [task-async8] | [c.i.c.a.d.s.impl.TableServiceImpl:1073] | --> [TRACE_ERROR]-[############START ==> (Map)ObjectMapperUtils.IGNORE_MAPPER.readValue {code=000000, message=successful., body=true, timestamp=2024-08-15T06:59:00.727239951Z}]|
[2024-08-15 14:59:04.578] | [ERROR] | [PID=84987] | [task-async1] | [c.i.c.a.d.s.impl.TableServiceImpl:1073] | --> [TRACE_ERROR]-[############START ==> (Map)ObjectMapperUtils.IGNORE_MAPPER.readValue {code=000000, message=successful., body=true, timestamp=2024-08-15T06:59:04.575888515Z}]|
[2024-08-15 14:59:08.797] | [ERROR] | [PID=84987] | [task-async3] | [c.i.c.a.d.s.impl.TableServiceImpl:1073] | --> [TRACE_ERROR]-[############START ==> (Map)ObjectMapperUtils.IGNORE_MAPPER.readValue {code=000000, message=successful., body=true, timestamp=2024-08-15T06:59:08.795127710Z}]|
[2024-08-15 14:59:48.555] | [ERROR] | [PID=84987] | [task-async11] | [c.i.c.a.d.s.impl.TableServiceImpl:1073] | --> [TRACE_ERROR]-[############START ==> (Map)ObjectMapperUtils.IGNORE_MAPPER.readValue {code=000000, message=successful., body=true, timestamp=2024-08-15T06:59:48.553372104Z}]|
==> cdc-dpm/err_cdc-dpm.log <==
==> cdc-extractor/err_cdc-extractor.log <==
复制代码

 

posted @   AlamZ  阅读(140)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示