Skip to main content

A module to use for console and stackdriver logging

Project description

Logging library for Python using Stackdriver

Reference for good logging

here Check out 'Write logging records everywhere with a proper level' section

To use logging:

  1. Copy logging.yaml and stackdriver.py into the project you want to use
  2. In order to import the logger, 'from stackdriver import stackdriver_logger'
  3. In order to initialize the logger, 'mdp_logger = stackdriver_logger()'
  4. In order to use the logger, 'mdp_logger.info('shows up on stackdriver and console')'

Logging Levels in current configuration (set in logging.yaml)

  • debug: lowest level and logs of these kinds don't show up as of current configuration
  • info: info logs will show up on stdout and in stackdriver
  • warning: warn logs will show up on stdout and in stackdriver
  • error: error logs will show up on stdout and in stackdrtiver
  • critical: critical logs will show up on stdout and in stackdriver

Change log level that shows up in Stackdriver

In logging.yaml, under handlers:stackdriver, change the level field to the lowest level you want to see in stackdriver. Anything that level and higher will now show up.

Change log level that shows up on console

In logging.yaml, under handlers:console, change the level field to the lowest level you want to see show up in console. Anything that level and higher will now show up.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-stackdriver-logging-mdp1-0.0.3.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file python-stackdriver-logging-mdp1-0.0.3.tar.gz.

File metadata

  • Download URL: python-stackdriver-logging-mdp1-0.0.3.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for python-stackdriver-logging-mdp1-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f725ae4fac87ec27c3221bbe70d495983b135fc13a9c15bfbae2443ffbbcabc4
MD5 67406a4ee5ce8a26da4bd56c7e02f49f
BLAKE2b-256 9f038392b33a95540cba2251ef20b834779f1d5dc4b1d1eff16d31f18a52f171

See more details on using hashes here.

File details

Details for the file python_stackdriver_logging_mdp1-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: python_stackdriver_logging_mdp1-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for python_stackdriver_logging_mdp1-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b6ace8f2309d87c697d56faa8a38d0c8a5e1d5eae95ac15fc0d3855fc53acc4c
MD5 2866b059245d5bc9396fe3359a687a84
BLAKE2b-256 0a824653dba878b95ea9e18f70d503a1a5fb26774ac270b8b665d2a7de36511b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page