Search code examples
google-cloud-platformgcloud

gcloud logging read not returning anything, no errors either


I'm trying to retreive all the logs within a specific time, here is my command:

gcloud logging read 'timestamp<="2022-08-15T12:50:00Z" AND timestamp>="2022-08-15T13:20:00Z"' --bucket=pre-prod --project=non-prod --location=global --view=_AllLogs --freshness=3d

I've specified the freshness, but it just returns nothing, no errors either.

Anyone know why this is not working? I can see the logs on the GCP console for the above dates, but logging read just not working.


Solution

  • Had wrong timestamps, needed to swap the greater than and lower than symbols.