Socket
Socket
Sign inDemoInstall

python-stackdriver-logging-mdp1

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-stackdriver-logging-mdp1

A module to use for console and stackdriver logging


Maintainers
1

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc