-
Notifications
You must be signed in to change notification settings - Fork 133
Improve logging - satosa.routing #275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve logging - satosa.routing #275
Conversation
I'm taking a random change: - satosa_logging(logger, logging.DEBUG, "Routing to backend: %s " % context.target_backend, context.state)
+ logger.debug("Routing to backend: %s " % context.target_backend) I note two things here:
- satosa_logging(logger, logging.DEBUG, "Routing to backend: %s " % context.target_backend, context.state)
+ msg = "Routing to backend: {backend}".format(backend=context.target_backend)
+ logger.debug(msg)
- satosa_logging(logger, logging.DEBUG, "Routing to backend: %s " % context.target_backend, context.state)
+ msg = "Routing to backend: {backend}".format(backend=context.target_backend)
+ logline = "[{id}] {message}".format(id=state.get("SESSION_ID"), message=msg)
+ logger.debug(logline) |
Thanks @sebulibah This is the first merge towards improving the state of logging in the project. For those interested we will start by removing the |
This reverts commit 4cfd932.
Good news, I prefer direct call to logging instances too |
@sebulibah see 053df98 and 4065cfd . I have extracted the log format and the way we should get the session id, so it should be easier to follow that pattern and avoid such typos in the future ;) |
You're welcome |
All Submissions: