Skip to content

Commit

Permalink
use connexion logger instead of root logger (#2010)
Browse files Browse the repository at this point in the history
In `request_validation.py` and `response_validation.py` there is a call
to `logging.info()` which means the log message goes through the root
logger instead of the `connexion.middleware.validation` logger.
  • Loading branch information
FelixSchwarz authored Dec 4, 2024
1 parent 58c8bb6 commit 0a50bbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion connexion/middleware/request_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send):
try:
body_validator = self._validator_map["body"][mime_type] # type: ignore
except KeyError:
logging.info(
logger.info(
f"Skipping validation. No validator registered for content type: "
f"{mime_type}."
)
Expand Down
2 changes: 1 addition & 1 deletion connexion/middleware/response_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async def wrapped_send(message: t.MutableMapping[str, t.Any]) -> None:
try:
body_validator = self._validator_map["response"][mime_type] # type: ignore
except KeyError:
logging.info(
logger.info(
f"Skipping validation. No validator registered for content type: "
f"{mime_type}."
)
Expand Down

0 comments on commit 0a50bbb

Please sign in to comment.