[英]Google Cloud Logging: show lines above and below the matched lines
Sometimes when searching logs by keyword or other conditions, I want to show not only the lines which match the condition, but also a few lines around them to better understand the context, similar to the -C
flag of grep
.有时在按关键字或其他条件搜索日志时,我不仅想显示与条件匹配的行,还希望显示它们周围的几行以更好地理解上下文,类似于grep
的-C
标志。
Is this possible?这可能吗?
I do not think it is possible to achieve this on Google Cloud Logging.我认为在 Google Cloud Logging 上不可能实现这一点。
I usually run a first query, get the timestamp of the log that I am interested in and then run a second query using Custom time range .我通常运行第一个查询,获取我感兴趣的日志的时间戳,然后使用Custom time range运行第二个查询。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.