auth: optimized logging with lazy eval of params formatting
This commit is contained in:
parent
a05c3915b9
commit
0e5495de20
1 changed files with 3 additions and 1 deletions
|
|
@ -47,6 +47,7 @@ def discover_legacy_plugins(config, prefix=legacy_plugin_prefix):
|
|||
setting in database which are using the specified prefix. Normally 'py:' is
|
||||
used for the legacy plugins.
|
||||
"""
|
||||
|
||||
log.debug('authentication: running legacy plugin discovery for prefix %s',
|
||||
legacy_plugin_prefix)
|
||||
try:
|
||||
|
|
@ -64,10 +65,11 @@ def discover_legacy_plugins(config, prefix=legacy_plugin_prefix):
|
|||
except Exception as e:
|
||||
log.exception(
|
||||
'Exception while loading legacy authentication plugin '
|
||||
'"{}": {}'.format(plugin_id, e.message))
|
||||
'"%s": %s', plugin_id, e)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
|
||||
# Set authentication policy.
|
||||
authn_policy = SessionAuthenticationPolicy()
|
||||
config.set_authentication_policy(authn_policy)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue