Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Latest commit

 

History

History
25 lines (18 loc) · 534 Bytes

debugging.md

File metadata and controls

25 lines (18 loc) · 534 Bytes

This is an example of debugging the data results used in app.py and outputting errors to the error log.

Near the top of the file to debug:

import logging
from logging.config import fileConfig

fileConfig('logging_config.ini')
logger = logging.getLogger()

import sys
from pprint import pformat

Example of debugging the value of an events index in a 'data' array:

    # logger.error("-------");
    logger.error(pformat(data.get('events')));
    logger.error("-------");
    # logger.error(events);

    sys.exit()