mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 01:14: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)
|
cherrypy.log.error_log.setLevel(level)
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
|
cherrypy.log.error_log.handlers = []
|
||||||
handler = logging.StreamHandler(sys.stderr)
|
handler = logging.StreamHandler(sys.stderr)
|
||||||
handler.setLevel(logging.DEBUG)
|
handler.setLevel(logging.DEBUG)
|
||||||
cherrypy.log.error_log.addHandler(handler)
|
cherrypy.log.error_log.addHandler(handler)
|
||||||
|
Loading…
Reference in New Issue
Block a user