If GCP does not recognize the severity notation of logged message, it will consider anything emitted to stdout as INFO and anything emitted to stderr as ERROR
by providing a message field, only that message is displayed in the log entry line in the explorer, with the ability to unfold entire log message to view other properties. Without it, the entire json object appears on the log line
This library should provide an easy way to integrate Google Cloud Logging's schema into an application. Though engineers could set up this integration themselves, providing an integration through this library provides an easy path to transition should engineers want to make the switch.
Quoting the Dockerflow spec:
Many Mozilla service are now being deployed on GCP, and as such use Google Cloud Logging (FKA Stackdriver) to ingest logs.
Google Cloud Logging has its own schema that defines the shape of a structured log, and the fields of this schema affect the presentation of the log in the Logs Explorer.
For example:
stdout
asINFO
and anything emitted tostderr
asERROR
message
field, only that message is displayed in the log entry line in the explorer, with the ability to unfold entire log message to view other properties. Without it, the entire json object appears on the log lineThis library should provide an easy way to integrate Google Cloud Logging's schema into an application. Though engineers could set up this integration themselves, providing an integration through this library provides an easy path to transition should engineers want to make the switch.