I am using a none supported language on GCP.
Stackdriver logging is great it collects my stdout logs which is most excellent.
However I can't seem to set a severity.
All the documentation pages seem to revolve around sending whole logs.
I would like to know what a message needs to look like when sending it to stdout so it picks up on the severity. An Example would be amazing.
There appears to be some quite good documentation on writing stdout/stderr output from your apps and how this translates to Stackdriver output found here.
If you write a JSON string to output the structure will be parsed.
Documentation on special fields can be found here.
In summary,
The content of your output will appear in the jsonPayload field of the Stackdriver record entry.
An example sent to stdout might be:
{
"severity": "NOTICE",
"message": "Hello World!",
"additional-part": "More Data!"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With