summaryrefslogtreecommitdiff
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-08 20:56:50 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-08 20:56:50 (GMT)
commitaa923c4abf0562a326bd10700f6eebe58bf3a3c0 (patch)
tree52724fce4897a533872c256d59a2b7b2b30e14c1 /pykolab
parente0326b2e0d7b9fb88592baf7dc1991bd4d35a0e6 (diff)
downloadpykolab-aa923c4abf0562a326bd10700f6eebe58bf3a3c0.tar.gz
Vastly increase the debug verbosity on level 9 (trace), as the lack of SQLAlchemy plus dependencies goes over silently.
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/__init__.py32
1 files changed, 30 insertions, 2 deletions
diff --git a/pykolab/auth/__init__.py b/pykolab/auth/__init__.py
index 47f2322..a50ee1b 100644
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@ -91,7 +91,8 @@ class Auth(pykolab.base.Base):
back to the primary domain specified by the configuration.
"""
- log.debug(_("Called for domain %r") % (domain))
+ log.debug(_("Called for domain %r") % (domain), level=9)
+
if not self._auth == None:
return
@@ -102,11 +103,21 @@ class Auth(pykolab.base.Base):
self.list_domains()
section = domain
+ log.debug(
+ _("Using section %s and domain %s") % (section,domain),
+ level=9
+ )
+
if self.secondary_domains.has_key(domain):
section = self.secondary_domains[domain]
domain = self.secondary_domains[domain]
log.debug(
+ _("Using section %s and domain %s") % (section,domain),
+ level=9
+ )
+
+ log.debug(
_("Connecting to Authentication backend for domain %s") % (
domain
),
@@ -117,16 +128,33 @@ class Auth(pykolab.base.Base):
section = 'kolab'
if not conf.has_option(section, 'auth_mechanism'):
- section = 'kolab'
+ log.debug(
+ _("Section %s has no option 'auth_mechanism'") % (section),
+ level=9
+ )
+ section = 'kolab'
+ else:
+ log.debug(
+ _("Section %s has auth_mechanism: %r") % (
+ section,
+ conf.get(section,'auth_mechanism')
+ ),
+ level=9
+ )
+
+ # Get the actual authentication and authorization backend.
if conf.get(section, 'auth_mechanism') == 'ldap':
+ log.debug(_("Starting LDAP..."), level=9)
from pykolab.auth import ldap
self._auth = ldap.LDAP(self.domain)
+
elif conf.get(section, 'auth_mechanism') == 'sql':
from pykolab.auth import sql
self._auth = sql.SQL(self.domain)
else:
+ log.debug(_("Starting LDAP..."), level=9)
from pykolab.auth import ldap
self._auth = ldap.LDAP(self.domain)