Skip to content

Commit

Permalink
Different setup-logging procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
nhartland committed Jul 13, 2020
1 parent 8ea6a04 commit 8c42535
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion dashengine/pageloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
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. """
efe = 54
page_dict = {}
for root in roots:
for importer, package_name, _ in pkgutil.iter_modules([root]):
Expand Down
11 changes: 3 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@
import dashengine.pageloader as pageloader

# logging
import logging
import google.cloud.logging
from google.cloud.logging.handlers import CloudLoggingHandler, setup_logging

# Setup log handler
log_client = google.cloud.logging.Client()
log_handler = CloudLoggingHandler(log_client)
logging.getLogger().setLevel(logging.INFO)
setup_logging(log_handler)
client = google.cloud.logging.Client()
client.get_default_handler()
client.setup_logging()

# Setup 'app' variable for GAE
app = dashapp.server
Expand Down

0 comments on commit 8c42535

Please sign in to comment.