Skip to content

Commit

Permalink
Remove proxy code from ColoredRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
borntyping committed Apr 13, 2021
1 parent 73b4971 commit 16a4dc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions colorlog/colorlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,9 @@ class ColoredRecord(object):
StrFormatStyle, and StringTemplateStyle classes).
"""

def __init__(
self,
record: logging.LogRecord,
escapes: EscapeCodes,
) -> None:
"""Add attributes from the escape_codes dict and the record."""
def __init__(self, record: logging.LogRecord, escapes: EscapeCodes) -> None:
self.__dict__.update(record.__dict__)
self.__dict__.update(escapes)
self._record = record

def __getattr__(self, name: str) -> typing.Any:
return getattr(self._record, name)


class ColoredFormatter(logging.Formatter):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="colorlog",
version="6.0.0-alpha.2",
version="6.0.0-alpha.3",
description="Add colours to the output of Python's logging module.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 16a4dc7

Please sign in to comment.