From 0e5495de20fc921ea1cadcf4db6d072524114952 Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Thu, 11 May 2023 12:26:08 +0200 Subject: [PATCH] auth: optimized logging with lazy eval of params formatting --- rhodecode/authentication/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rhodecode/authentication/__init__.py b/rhodecode/authentication/__init__.py index 9e31a1c2..8d4394c9 100644 --- a/rhodecode/authentication/__init__.py +++ b/rhodecode/authentication/__init__.py @@ -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)