aboutsummaryrefslogtreecommitdiffstats
path: root/pysite
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-03-10 19:49:28 +0000
committerGravatar Gareth Coles <[email protected]>2018-03-10 19:49:28 +0000
commit177a5261607febd4491f055cfc511551594bd75c (patch)
treea6d7a7780589e5fe193207636ca29b629af5022c /pysite
parentLogging with Papertrail (diff)
Logging fixes
Diffstat (limited to 'pysite')
-rw-r--r--pysite/__init__.py2
-rw-r--r--pysite/constants.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/pysite/__init__.py b/pysite/__init__.py
index fa5aa8b8..f807eaf4 100644
--- a/pysite/__init__.py
+++ b/pysite/__init__.py
@@ -24,7 +24,7 @@ if PAPERTRAIL_ADDRESS:
logging_handlers.append(StreamHandler(stream=sys.stderr))
logging.basicConfig(
- format="%(asctime)s pd.beardfist.com Site: | %(name)15s | %(levelname)8s | %(message)s",
+ format="%(asctime)s pd.beardfist.com Site: | %(name)30s | %(levelname)8s | %(message)s",
datefmt="%b %d %H:%M:%S",
level=log_level,
handlers=logging_handlers
diff --git a/pysite/constants.py b/pysite/constants.py
index d9b87cb6..d6ed489f 100644
--- a/pysite/constants.py
+++ b/pysite/constants.py
@@ -46,5 +46,5 @@ ERROR_DESCRIPTIONS = {
}
# PaperTrail logging
-PAPERTRAIL_ADDRESS = os.environ.get("PAPERTRAIL_ADDRESS")
-PAPERTRAIL_PORT = int(os.environ.get("PAPERTRAIL_PORT", 0))
+PAPERTRAIL_ADDRESS = os.environ.get("PAPERTRAIL_ADDRESS") or None
+PAPERTRAIL_PORT = int(os.environ.get("PAPERTRAIL_PORT") or 0)