GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing docs.stackify.com — Configure Python Logging

To configure your Python application, an Application Programming Interface (API) can be used to send Errors and Logs to Retrace. The step-by-step process is presented below and for more information, visit this Stackify API for Python Github page: https://github.com/stackify/stackify-api-python.

Installation and Configuration

Python Logging Integration

Python logging can be setup to extend an existing logger by adding a handler.

Install stackify-api-python module:

pip install stackify-api-python

Adjust your application to use the StackifyHandler:

import logging
import stackify
logger = logging.getLogger()
stackify_handler = stackify.StackifyHandler(application="Python Application", environment="Production", api_key="***")
logger.addHandler(stackify_handler)
logger.warning('Something happened')

Standard API

Python logging can use the Stackify logger directly if no existing logger is present in your application.

Install stackify-api-python module:

pip install stackify-api-python

Adjust your application to use the Stackify logger directly:

import stackify
logger = stackify.getLogger(application="Python Application", environment="Production", api_key="***")
logger.warning('Something happened')

Troubleshooting

If there are problems, you can enable internal logging of the stackify-api-python project.

import logging
logging.getLogger('stackify').setLevel(logging.DEBUG)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.