#148: Don't leak data in logs.

This commit is contained in:
Bill Dengler 2017-07-25 20:14:28 +00:00
parent f640556be6
commit 7a5c3a4e7b
2 changed files with 5 additions and 3 deletions

View File

@ -3,6 +3,7 @@ import logging
from logging.handlers import RotatingFileHandler from logging.handlers import RotatingFileHandler
import paths import paths
import sys import sys
import config
APP_LOG_FILE = 'debug.log' APP_LOG_FILE = 'debug.log'
ERROR_LOG_FILE = "error.log" ERROR_LOG_FILE = "error.log"
@ -24,8 +25,7 @@ server_log.setLevel(logging.WARNING)
logger = logging.getLogger() logger = logging.getLogger()
logger.setLevel(logging.DEBUG) logger.setLevel(logging.WARNING)
#handlers #handlers
app_handler = RotatingFileHandler(paths.logs_path(APP_LOG_FILE), mode="w") app_handler = RotatingFileHandler(paths.logs_path(APP_LOG_FILE), mode="w")

View File

@ -54,8 +54,10 @@ if system == "Linux":
log = logging.getLogger("main") log = logging.getLogger("main")
def setup(): def setup():
log.debug("Starting " + application.name + " %s" % (application.version,))
config.setup() config.setup()
if not config.app['app-settings']['paranoid']:
logger.setLevel(logging.DEBUG)
log.debug("Starting " + application.name + " %s" % (application.version,))
log.debug("Using %s %s" % (platform.system(), platform.architecture()[0])) log.debug("Using %s %s" % (platform.system(), platform.architecture()[0]))
log.debug("Application path is %s" % (paths.app_path(),)) log.debug("Application path is %s" % (paths.app_path(),))
log.debug("config path is %s" % (paths.config_path(),)) log.debug("config path is %s" % (paths.config_path(),))