A collection of configurations of popular logging libraries for Cloud Logging setup
The aim of this repository is to collect samples to configure popular logging libraries to output JSON formatted structured logs eligible for Google Cloud Logging.
In order for Google Cloud Logging to recognize JSON formatted structure logs properly, there are a couple of conditions:
- Logs are output to stdout
- Some field names are set correctly (eg.
severity
,message
)
These conditions does not match the default configrations of popular logging libraries, sometimes developers need to find out complex work around to make logs Google Cloud Logging aware. To visualize those efforts all in one place, this repository is created for its experimental purpose.
This repository contains the samples of logging libraries to be Google Cloud Logging aware in variety of languages.
- Go
- Python
- Node.js
- Java
- PHP