I have a python service running in kubernetes container and writing logs to stdout. I can see the logs in Cloud Logging Console, but they are not structured, meanining: 1. I can't filter log levels 2. Log record with multiple lines interpreted as multiple log records 3. Dates are not parse etc.
How can I address this problem? Can I configure flunetd deamon somehow? Or should I write in a specific format?
Thanks
If you're running at least version 1.1.0 of Kubernetes (you most likely are), then if the logs you write are JSON formatted, they'll show up as structured logs in the Cloud Logging console.
Then certain JSON keys are interpreted specially when imported into Cloud Logging, for example 'severity' will be used to set the log level in the console, or 'timestamp' can be used to set the time.