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?
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