How to export previous logs in Stackdriver

前端 未结 4 1612
长情又很酷
长情又很酷 2021-02-19 02:43

I have a log in Stackdriver that logs every request goes into my api and failed, and I want to write a script to count on the number of times each error message appears. The pro

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-19 03:24

    Note that the filter is same as when you choose advanced filter in the Logging gui.

    gcloud beta logging read "resource.type=\"gae_app\" resource.labels.module_id=\"api\" \"Ronald Reagan\"" --format=json --freshness=6d > x.txt
    

提交回复
热议问题