diff --git a/kallithea/controllers/admin/auth_settings.py b/kallithea/controllers/admin/auth_settings.py --- a/kallithea/controllers/admin/auth_settings.py +++ b/kallithea/controllers/admin/auth_settings.py @@ -37,7 +37,6 @@ from kallithea.lib import auth_modules from kallithea.lib import helpers as h from kallithea.lib.auth import HasPermissionAnyDecorator, LoginRequired from kallithea.lib.base import BaseController, render -from kallithea.lib.compat import formatted_json from kallithea.model.db import Setting from kallithea.model.forms import AuthSettingsForm from kallithea.model.meta import Session @@ -87,7 +86,7 @@ class AuthSettingsController(BaseControl # we want to show , separated list of enabled plugins c.defaults['auth_plugins'] = ','.join(c.enabled_plugin_names) - log.debug(formatted_json(defaults)) + log.debug('defaults: %s', defaults) return formencode.htmlfill.render( render('admin/auth/auth_settings.html'), defaults=c.defaults, @@ -103,7 +102,7 @@ class AuthSettingsController(BaseControl def auth_settings(self): """POST create and store auth settings""" self.__load_defaults() - log.debug("POST Result: %s", formatted_json(dict(request.POST))) + log.debug("POST Result: %s", dict(request.POST)) # First, parse only the plugin list (not the plugin settings). _auth_plugins_validator = AuthSettingsForm([]).fields['auth_plugins'] diff --git a/kallithea/lib/auth_modules/__init__.py b/kallithea/lib/auth_modules/__init__.py --- a/kallithea/lib/auth_modules/__init__.py +++ b/kallithea/lib/auth_modules/__init__.py @@ -20,7 +20,7 @@ import logging import traceback from kallithea.lib.auth import AuthUser, PasswordGenerator -from kallithea.lib.compat import formatted_json, hybrid_property +from kallithea.lib.compat import hybrid_property from kallithea.lib.utils2 import str2bool from kallithea.model.db import Setting, User from kallithea.model.meta import Session @@ -348,7 +348,7 @@ def authenticate(username, password, env conf_key = "auth_%s_%s" % (plugin_name, v["name"]) setting = Setting.get_by_name(conf_key) plugin_settings[v["name"]] = setting.app_settings_value if setting else None - log.debug('Settings for auth plugin %s:\n%s', plugin_name, formatted_json(plugin_settings)) + log.debug('Settings for auth plugin %s: %s', plugin_name, plugin_settings) if not str2bool(plugin_settings["enabled"]): log.info("Authentication plugin %s is disabled, skipping for %s", diff --git a/kallithea/lib/auth_modules/auth_internal.py b/kallithea/lib/auth_modules/auth_internal.py --- a/kallithea/lib/auth_modules/auth_internal.py +++ b/kallithea/lib/auth_modules/auth_internal.py @@ -29,7 +29,7 @@ Original author and date, and relevant c import logging from kallithea.lib import auth_modules -from kallithea.lib.compat import formatted_json, hybrid_property +from kallithea.lib.compat import hybrid_property log = logging.getLogger(__name__) @@ -76,7 +76,7 @@ class KallitheaAuthPlugin(auth_modules.K "admin": userobj.admin, "extern_name": userobj.user_id, } - log.debug(formatted_json(user_data)) + log.debug('user data: %s', user_data) from kallithea.lib import auth password_match = auth.check_password(password, userobj.password) diff --git a/kallithea/lib/auth_modules/auth_pam.py b/kallithea/lib/auth_modules/auth_pam.py --- a/kallithea/lib/auth_modules/auth_pam.py +++ b/kallithea/lib/auth_modules/auth_pam.py @@ -32,7 +32,7 @@ import threading import time from kallithea.lib import auth_modules -from kallithea.lib.compat import formatted_json, hybrid_property +from kallithea.lib.compat import hybrid_property try: @@ -142,7 +142,7 @@ class KallitheaAuthPlugin(auth_modules.K log.warning("Cannot extract additional info for PAM user %s", username) pass - log.debug("pamuser: \n%s", formatted_json(user_data)) + log.debug("pamuser: %s", user_data) log.info('user %s authenticated correctly', user_data['username']) return user_data