jwayne
jwayne

Reputation: 746

Can we disable GCP Stackdriver's truncation of log lines?

Stackdriver logs seems to truncate log lines exceeding ~256 chars. This is really annoying, since Stackdriver also doesn't let you filter for log lines matching a particular string, and then find its neighboring log lines.

Our use case is that sometimes, we want to log a very long message (e.g., a stack trace). Then, we want to be able to filter for those messages via an identifier that only appears in the first line. We can't output the message across multiple lines, since we when we filter, we can only find the first line and not neighboring lines. We also can't output the entire message onto 1 line, since Stackdriver truncates us at ~256 chars. This makes debugging many errors nearly impossible.

FTR, oddly, I'm not always truncated at exactly 256 chars - sometimes it's 260, sometimes 256, and I assume other times it can be in between.

Alternately, is there another way to view Google Cloud ML logs than Stackdriver?

Upvotes: 5

Views: 5162

Answers (1)

johnmcs
johnmcs

Reputation: 449

Your log may be visible as dropdown attribute, e.g. jsonPayload

imgur screenshot

Upvotes: 2

Related Questions