Skip to content

Commit c330483

Browse files
Merge pull request #287 from sebulibah/satosa/plugin_loader-logger
Improve logging - satosa.plugin_loader
2 parents 127ab0f + e8f3ead commit c330483

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/satosa/plugin_loader.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def load_backends(config, callback, internal_attributes):
4646
config["BACKEND_MODULES"],
4747
backend_filter, config["BASE"],
4848
internal_attributes, callback)
49-
logger.info("Setup backends: %s" % [backend.name for backend in backend_modules])
49+
logger.info("Setup backends: {}".format([backend.name for backend in backend_modules]))
5050
return backend_modules
5151

5252

@@ -67,7 +67,7 @@ def load_frontends(config, callback, internal_attributes):
6767
"""
6868
frontend_modules = _load_plugins(config.get("CUSTOM_PLUGIN_MODULE_PATHS"), config["FRONTEND_MODULES"],
6969
frontend_filter, config["BASE"], internal_attributes, callback)
70-
logger.info("Setup frontends: %s" % [frontend.name for frontend in frontend_modules])
70+
logger.info("Setup frontends: {}".format([frontend.name for frontend in frontend_modules]))
7171
return frontend_modules
7272

7373

@@ -147,7 +147,7 @@ def _load_plugin_config(config):
147147
except YAMLError as exc:
148148
if hasattr(exc, 'problem_mark'):
149149
mark = exc.problem_mark
150-
logger.error("Error position: (%s:%s)" % (mark.line + 1, mark.column + 1))
150+
logger.error("Error position: ({line}:{column})".format(line=mark.line + 1, column=mark.column + 1))
151151
raise SATOSAConfigurationError("The configuration is corrupt.") from exc
152152

153153

@@ -257,7 +257,7 @@ def load_request_microservices(plugin_path, plugins, internal_attributes, base_u
257257
"""
258258
request_services = _load_microservices(plugin_path, plugins, _request_micro_service_filter, internal_attributes,
259259
base_url)
260-
logger.info("Loaded request micro services: %s" % [type(k).__name__ for k in request_services])
260+
logger.info("Loaded request micro services: {}".format([type(k).__name__ for k in request_services]))
261261
return request_services
262262

263263

@@ -278,5 +278,5 @@ def load_response_microservices(plugin_path, plugins, internal_attributes, base_
278278
"""
279279
response_services = _load_microservices(plugin_path, plugins, _response_micro_service_filter, internal_attributes,
280280
base_url)
281-
logger.info("Loaded response micro services: %s" % [type(k).__name__ for k in response_services])
281+
logger.info("Loaded response micro services:{}".format([type(k).__name__ for k in response_services]))
282282
return response_services

0 commit comments

Comments
 (0)