1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-21 17:04:21 +01:00

disable default logger if running in debug mode (-D)

Debug mode can lead to log sensitive data (like password changes).
Having -D to log exclusively to stderr is a safer option.
This commit is contained in:
kakwa 2019-02-12 22:36:16 +01:00
parent 799ca2403f
commit 73c02ccff4

View File

@ -330,6 +330,7 @@ class LdapCherry(object):
cherrypy.log.error_log.setLevel(level)
if debug:
cherrypy.log.error_log.handlers = []
handler = logging.StreamHandler(sys.stderr)
handler.setLevel(logging.DEBUG)
cherrypy.log.error_log.addHandler(handler)