From be1a4b0d914e7bc0a5228959a95cf2ff955e36a1 Mon Sep 17 00:00:00 2001 From: Daniel Richman Date: Thu, 27 Dec 2012 21:21:51 +0000 Subject: [PATCH] Add email error logging --- habitat.yml | 9 +++++++-- habitat_transition/app.py | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/habitat.yml b/habitat.yml index 48f0c60..2d8ef4c 100644 --- a/habitat.yml +++ b/habitat.yml @@ -1,6 +1,11 @@ couch_uri: "http://localhost:5984" couch_db: habitat -log_stderr_level: DEBUG -log_file_level: NONE +log_levels: + stderr: NONE + file: NONE + email: NONE spacenearus: + log_file: tracker: "http://habhub.org/tracker/track.php?{0}" +transition_app: + log_file: diff --git a/habitat_transition/app.py b/habitat_transition/app.py index 9f4854b..74e37a7 100644 --- a/habitat_transition/app.py +++ b/habitat_transition/app.py @@ -29,7 +29,7 @@ from xml.sax.saxutils import escape as htmlescape from habitat import uploader from . import couch_to_xml -from habitat.utils.startup import load_config +from habitat.utils.startup import load_config, setup_logging # Monkey patch float precision json.encoder.FLOAT_REPR = lambda o: format(o, '.5f') @@ -41,6 +41,7 @@ # N.B.: Searches working directory since it won't be specified in argv. # Configure uwsgi appropriately. config = load_config() +setup_logging(config, "transition_app") couch_settings = {"couch_uri": config["couch_uri"], "couch_db": config["couch_db"]}