From 23292754e3c479d020cc518f709cfd9704a3b8d8 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 19 Mar 2016 15:10:19 -0500 Subject: [PATCH] fixed gae logging issue --- gluon/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gluon/main.py b/gluon/main.py index b2d20b96..5952dc71 100644 --- a/gluon/main.py +++ b/gluon/main.py @@ -80,10 +80,9 @@ locale.setlocale(locale.LC_CTYPE, "C") # IMPORTANT, web2py requires locale "C" exists = os.path.exists pjoin = os.path.join -logpath = abspath("logging.conf") -if exists(logpath): +try: logging.config.fileConfig(abspath("logging.conf")) -else: +except: # fails on GAE or when logfile is missing logging.basicConfig() logger = logging.getLogger("web2py")