I'm currently looking for simplest possible JSON log messages that would simply write a severity and a message to Stackdriver logging from a container that is run in Kubernetes Engine and is using the managed Fluentd daemon.
Basically I'm writing single line JSON entries as follows.
{"severity": "DEBUG", "message": "I'm a debug entry"}
{"severity": "ERROR", "message": "I'm an error entry"}
These end up in Stackdriver logging with following results.
- Severity is always INFO
- There's JSON payload in the log entry, and the only content is the message, i.e. severity does not go there.
My conclusion is that Fluentd recognizes log row as JSON, but what I don't understand is that how the severity is not set into log entries correctly. Am I e.g. missing some mandatory fields that need to be in place?