Skip to content

Commit

Permalink
prefix third-party package logs with name
Browse files Browse the repository at this point in the history
  • Loading branch information
abn committed Apr 26, 2022
1 parent 660b43a commit a22b4c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/poetry/console/logging/io_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from typing import TYPE_CHECKING

from poetry.console.logging.filters import POETRY_FILTER
from poetry.console.logging.formatters import FORMATTERS


Expand Down Expand Up @@ -32,4 +33,8 @@ def format(self, record: LogRecord) -> str:

record.msg = msg

if not POETRY_FILTER.filter(record):
# prefix third-party packages with name for easier debugging
record.msg = f"[{record.name}] {record.msg}"

return super().format(record)

0 comments on commit a22b4c6

Please # to comment.