summaryrefslogtreecommitdiffstats
path: root/ipsilon/providers/saml2idp.py
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-04-11 16:36:16 -0400
committerSimo Sorce <simo@redhat.com>2014-04-11 17:25:54 -0400
commit98caa6ed5e8a67703d92ccd170fe1731642aa01e (patch)
treee1f7a00644446ee14675a6f31cf2ea887d86a6b2 /ipsilon/providers/saml2idp.py
parent97b2ba92e574e401b737486fe0ac9833649e2702 (diff)
downloadipsilon-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>
Diffstat (limited to 'ipsilon/providers/saml2idp.py')
-rwxr-xr-xipsilon/providers/saml2idp.py7
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):