Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find logs between timestamps using stackdriver CLI

I need to find logs between two timestamps using stackdriver CLI. I used the below command.

gcloud beta logging read "timestamp>=\"2017-02-19T00:00:00Z\" AND timestamp<\"2017-03-14T00:00:00Z\"" 

But its giving me the error:

The filename, directory name, or volume label syntax is incorrect.

Here is my gcloud version details

gcloud --version

like image 941
Arun A Avatar asked Mar 15 '17 18:03

Arun A


1 Answers

The above answer doesn't seem to work anymore. Here's the new command.

gcloud logging read 'receiveTimestamp>="2019-08-08T21:00:00Z" AND receiveTimestamp<="2019-08-08T22:00:00Z"'

Actually, this is simpler. The escape characters has been removed along with the double "double quotes". :)

like image 128
EFreak Avatar answered Sep 26 '22 23:09

EFreak