{"repo":"multani/structlog-gcp","free":true,"listed":false,"github":"https://github.com/multani/structlog-gcp","clone":"git clone https://github.com/multani/structlog-gcp.git","description":"Google Cloud Logging formatter for structlog","language":"Python","stars":47,"topics":["gcp","google-cloud-logging","google-cloud-platform","logging","python","structlog"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Google Cloud Logging formatter for structlog This is an opiniated package that configures structlog to output log compatible with the Google Cloud Logging log format. The intention of this package is to be used for applications that run in Google Kubernetes Engine (GKE) or Google Cloud Function, or any other systems that know how to send logs to Google Cloud. As such, the package is only concerned about formatting logs , where logs are expected to be written on the standard output. Sending the logs to the actual Google Logging API is supposed to be done by an external agent. In particular, this package provides the following configuration by default: Logs are formatted as JSON using the Google Cloud Logging log format The Python standard library's logging log levels are available and translated to their GCP equivalents. Exceptions and CRITICAL log messages will be reported into Google Error Reporting dashboard Additional logger bound arguments will be reported into the jsonPayload event. How to use? Install the package with pip or your favorite Python package manager: Then, configure structlog as usual, using the Structlog processors the package provides: Then, you can use structlog as usual: The structlog gcp.build processors() function constructs structlog processors to: Output logs as Google Cloud Logging format using the default Python JSON serializer. Carry context variables across loggers (see structlog: Context Variables) For more advanced usage, see Advanced Configura","default_branch":null,"files":null,"tree":[],"storefront":"/r/multani","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/multani/structlog-gcp/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}