Skip to content

Commit

Permalink
Keep warning level for server-side logging (#3263)
Browse files Browse the repository at this point in the history
* Keep warning level for server-side logging

* Fix tests
  • Loading branch information
leplatrem committed Sep 13, 2023
1 parent c14b5e7 commit a3fc5ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kinto/core/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def permits(self, context, principals, permission):
allowed = context.check_permission(principals, bound_perms)

if not allowed:
logger.warning(
logger.info(
"Permission %r on %r not granted to %r.",
permission,
object_id,
Expand Down
2 changes: 1 addition & 1 deletion kinto/core/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def request_GET(request):
except UnicodeDecodeError:
querystring = request.environ.get("QUERY_STRING", "")
logger = logging.getLogger(__name__)
logger.warning("Error decoding QUERY_STRING: %s" % request.environ)
logger.info("Error decoding QUERY_STRING: %s" % request.environ)
raise http_error(
httpexceptions.HTTPBadRequest(),
errno=ERRORS.INVALID_PARAMETERS,
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def test_permits_logs_authz_failures(self):
userid = "portier:yourself"
object_id = "/articles/43/comments/2"
perm = "read"
mocked.warning.assert_called_with(
mocked.info.assert_called_with(
"Permission %r on %r not granted to %r.",
perm,
object_id,
Expand Down

0 comments on commit a3fc5ca

Please sign in to comment.