I am trying to correctly output logs on my service running on google cloud, and for the most part they are correctly identified (DEBUG
and INFO
logs, being sent to stdout
, are marked as info, whereas WARNING
, ERROR
, and CRITICAL
logs are sent to stderr
and are marked as error). Now, I am trying to get the exact severity out of them, without needing to use the google-cloud-logging
library. Is there a way where I can accomplish this?
Here an example of what I currently obtain is shown, with severity (icon on the left) matching whether the log comes from stdout
or stderr
.
This is what I'm trying to obtain, but without using the google-cloud-logging
library
Edit:
my logs are written to the output streams in json format, by using the python-json-logger
library for python. My google cloud logs have their information stored as in the picture below. We are not using fluentd for log parsing.