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:
parent
799ca2403f
commit
73c02ccff4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user