Skip to main content

Out of the box setup for python apps to send structured logs to Google Cloud's Stackdriver, in a format that allows stackdriver queries over the structure.

This package sets up structured logging with stackdriver that Just Works(TM): no configuration required. There's no confurability, but virtually no API means its easy to leave behind if you outgrow it.

Usage

from google_structlog import getLogger

logger = getLogger()
logger.warn('Danger Will Robinson', source='Robot', target='Will Robinson', threat='Boredom')

The logger comes from structlog and allows all the options you'd expect on a structlog.get_logger() logger, including binding of repeated attributes:

from google_structlog import getLogger
logger = getLogger()
# Include source= and target= values in the output of all calls to sublogger
sublogger = logger.bind(source='Robot', target='Will Robinson')
sublogger.warn('Danger Will Robinson: impending maintenance', threat='Responsibility')

Releasing a new version to pypi

  • Bump version in setup.py, make sure we stay ahead of Chrome and Firefox
  • rm -rf ./dist/* if needed to remove past versions
  • python3 setup.py sdist bdist_wheel
  • twine upload dist/*
  • Login to pypi as snickell lol

Metadata

Release files for google-structlog 43.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-structlog 43.12.0
File Size Uploaded
google_structlog-43.12.0.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for google-structlog 43.12.0
File Interpreter ABI Platform
google_structlog-43.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / google_structlog-43.12.0.tar.gz

Download URL google_structlog-43.12.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c11154ccd5fb35ec2a704644efccd42fb42eb490c7ab6bf1e86da2eef08fd83e
BLAKE2b-256 checksum
How to use checksums
b3936457aa9037120fbdee9f1a840c9dfcbfe3f8dc8f65c05ec97ffe14da2e3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.9

Release files / google_structlog-43.12.0-py3-none-any.whl

Download URL google_structlog-43.12.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bade03939e11983b662d5fcb320ea2e29831ef7984bd39b3bb281c6aafe6ec81
BLAKE2b-256 checksum
How to use checksums
b8a607e7b96958d105d13e32e511e3eeacbe683c06e1fa87a76db90f40b382bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.9

Release history Release notifications | RSS feed

This release

43.12.0 This release

2 release files

5.1.2

2 release files

4.2.7

2 release files

4.2.6

2 release files

2.6.2

2 release files

1.1.2

2 release files

1.1

2 release files

1.0.7

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page