def setup_logging():
    path = os.path.join(os.path.dirname(__file__), 'logconfig.json')
    try:
        with open(path, 'rt') as f:
            config = json.load(f)
    except Exception as e:
        logging.exception('Could not load logconfig.json. Loading default logging configuration.')
        config = default_config
    logging.config.dictConfig(config)
def setup_logging():
    path = os.path.join(os.path.dirname(__file__), 'logconfig.json')
    try:
        with open(path, 'rt') as f:
            config = json.load(f)
    except Exception as e:
        logging.exception('Could not load logconfig.json. Loading default logging configuration.')
        config = default_config
    logging.config.dictConfig(config)