A module to use for console and stackdriver logging
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.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size python_stackdriver_logging_mdpv2-0.0.1-py3-none-any.whl (1.9 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size python-stackdriver-logging-mdpv2-0.0.1.tar.gz (2.1 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for python_stackdriver_logging_mdpv2-0.0.1-py3-none-any.whl
Hashes for python-stackdriver-logging-mdpv2-0.0.1.tar.gz