简体   繁体   中英

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 .

Is this possible?

I do not think it is possible to achieve this on 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 .

Advanced logs queries

Also looking for this. What I found so far is the option to "Pin and show resource log entries" for a matched result. It will pin the entry, and then show it inline with the rest of the log

单击图标后的固定选项

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM