zl程序教程

您现在的位置是:首页 >  其他

当前栏目

使用grep 命令查看大日志文件某个时间段的日志内容

文件日志命令 查看 内容 某个 grep 时间段
2023-09-27 14:22:13 时间

#报错邮件:

- 按小时天气查询接口调用或解析错误,参数:错误信息:java.lang.NullPointerException

#查看error文件:

tail -200 error.log.2019-09-25

2019-09-25 19:05:13,270 [task.DailyWeatherReportTask_Worker-1] .service.impl.DailyWeatherReportServiceImpl.batchAddCityWeatherByHours(DailyWeatherReportServiceImpl.java:59) [59] - 按小时天气查询接口调用或解析错误,参数:错误信息:java.lang.NullPointerException 
 grep   '2019-09-25 19:0[5-7]' oms_timer.log.2019-09-25

查看到此处返回的接口为结果为空。问题找到