fixed gae logging issue
This commit is contained in:
1 parent
dcd7f8b46c
commit
23292754e3
1 file changed
+2
-3
+2
-3
@@ -80,10 +80,9 @@ locale.setlocale(locale.LC_CTYPE, "C") # IMPORTANT, web2py requires locale "C"
|
|||||||
exists = os.path.exists
|
exists = os.path.exists
|
||||||
pjoin = os.path.join
|
pjoin = os.path.join
|
||||||
|
|
||||||
logpath = abspath("logging.conf")
|
try:
|
||||||
if exists(logpath):
|
|
||||||
logging.config.fileConfig(abspath("logging.conf"))
|
logging.config.fileConfig(abspath("logging.conf"))
|
||||||
else:
|
except: # fails on GAE or when logfile is missing
|
||||||
logging.basicConfig()
|
logging.basicConfig()
|
||||||
logger = logging.getLogger("web2py")
|
logger = logging.getLogger("web2py")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user