mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-04-20 09:31:43 -04:00
#148: Don't leak data in logs.
This commit is contained in:
parent
f640556be6
commit
7a5c3a4e7b
@ -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")
|
||||||
|
@ -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(),))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user