diff options
author | Simo Sorce <simo@redhat.com> | 2014-04-11 16:36:16 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2014-04-11 17:25:54 -0400 |
commit | 98caa6ed5e8a67703d92ccd170fe1731642aa01e (patch) | |
tree | e1f7a00644446ee14675a6f31cf2ea887d86a6b2 | |
parent | 97b2ba92e574e401b737486fe0ac9833649e2702 (diff) | |
download | ipsilon-98caa6ed5e8a67703d92ccd170fe1731642aa01e.tar.gz ipsilon-98caa6ed5e8a67703d92ccd170fe1731642aa01e.tar.xz ipsilon-98caa6ed5e8a67703d92ccd170fe1731642aa01e.zip |
Add debug logging of lasso library
If debug is enabled make lasso spit debug messages to stderr too, to aid
admins in resolving issues related to saml2 issues, like finding out why
a metadata file may be rejected.
This is very simple for now, a future enhancement may involve piping the
logs into a calss so they can be spat out as feedback to users.
Signed-off-by: Simo Sorce <simo@redhat.com>
-rwxr-xr-x | ipsilon/providers/saml2idp.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ipsilon/providers/saml2idp.py b/ipsilon/providers/saml2idp.py index 0c8358d..1922c53 100755 --- a/ipsilon/providers/saml2idp.py +++ b/ipsilon/providers/saml2idp.py @@ -188,6 +188,13 @@ Provides SAML 2.0 authentication infrastructure. """ 'example.com' ] } + if cherrypy.config.get('debug', False): + import logging + import sys + logger = logging.getLogger('lasso') + lh = logging.StreamHandler(sys.stderr) + logger.addHandler(lh) + logger.setLevel(logging.DEBUG) @property def allow_self_registration(self): |