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:
- Copy logging.yaml and stackdriver.py into the project you want to use
- In order to import the logger, 'from stackdriver import stackdriver_logger'
- In order to initialize the logger, 'mdp_logger = stackdriver_logger()'
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python-stackdriver-logging-mdp1-0.0.26.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f123fc222c2acfc6695ac03856a6129a725876cc8e9af11384239ffeafa1aaa4 |
|
MD5 | e2704abab0ddf95517026b82f12456d9 |
|
BLAKE2b-256 | 69ea1e0993428a09334df6699a5f32977b0d87cef0c41f67fa6e290f1e3158d2 |
Close
Hashes for python_stackdriver_logging_mdp1-0.0.26-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3e69f9900693a66ceccb8a6ca6cf80856b55da79be427fe3c646942a2fae55b |
|
MD5 | 10a7f4c2182ff677c0b536b25c417bf9 |
|
BLAKE2b-256 | fb22f2e7ac0592f74a26438726fca64743d7293b71101cb134856c3238118584 |