If those with whom you work are most comfortable with command line tools, 
grep is definitely a very appropriate hands-on tool for the job.

If however, you'd like to aggregate log data or otherwise perform various 
operations on it, you might consider exporting the logs to BigQuery.  This 
process is described in Exporting Logs 
<https://cloud.google.com/logging/docs/export/configure_export>.  Within a 
dataset, one can specify a default table data expiration duration in days 
after which the table will be deleted.
>
> Any new table created in this dataset will be automatically deleted the 
> specified number of days after creation. This is useful for temporary data 
> which does not need to be preserved.

This can cut down some on some storage costs depending how much you're 
using.  In addition, many of the regular expressions you might be using 
with grep to parse your log text payloads can be used in BigQuery to 
separate payloads into multiple columns (see Regular expression functions 
<https://cloud.google.com/bigquery/query-reference#regularexpressionfunctions>
).

Hope this helps!

On Wednesday, June 22, 2016 at 5:15:47 AM UTC-4, Jonas Tingeborn wrote:
>
> *Is there a way to get the gcloud command to output just the textPayload 
> attribute values?*
>
> I haven't managed to figure out a good way of how to extract only the *log 
> lines* that an app submitts to stackdriver, without all the metadata 
> associated with the log entry, of which the actual log line is just one of 
> many attributes.
>
> Currently I've had to resort to some shell-fu in order to get the log 
> output in a form akin to what logging locally to file would have yielded.
> To get logs from a given docker container in container engine I presently 
> do something like the following:
>
> gcloud beta logging read '*<query-expression>*' --format list | grep ' 
> textPayload: ' | cut -c17- > relevant_log_lines
>
> *PS. thanks for providing a CLI for stackdriver, very handy indeed.*
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8803d7c8-3e19-475a-8c92-e24e41e37f90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to