Skip to content

Commit

Permalink
Adjustments to logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nhartland committed Jul 13, 2020
1 parent 8c42535 commit fcb38bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions dashengine/bigquery.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import uuid
import json
import logging
import datetime
import google.auth
import pandas as pd
Expand Down Expand Up @@ -84,7 +83,6 @@ def _load_query(query_id: str) -> BigQuery:
Returns:
(BigQuery): The query and query metadata.
"""
logger = logging.getLogger(__name__)
target_queryfile = os.path.join(QUERY_DATA_DIRECTORY, query_id + ".yml")

with open(target_queryfile, "r") as infile:
Expand All @@ -102,7 +100,8 @@ def _load_query(query_id: str) -> BigQuery:

# TODO figure out better error handling scheme
except yaml.YAMLError as exc:
logger.error(exc)
import logging
logging.error(exc)
raise exc


Expand Down
2 changes: 1 addition & 1 deletion dashengine/pageloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# System
import pkgutil
import importlib
import logging


def page_loader(roots: list) -> dict:
""" Reads page modules from subdirectories specified in the `roots` list,
and returns them in a dictionary keyed by module.ROUTE. """
import logging
page_dict = {}
for root in roots:
for importer, package_name, _ in pkgutil.iter_modules([root]):
Expand Down

0 comments on commit fcb38bd

Please sign in to comment.