Skip to content

Commit 47d3af7

Browse files
committed
Update 's docstring
1 parent 9f96dda commit 47d3af7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/clp_logging/handlers.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ def _write(self, loglevel: int, msg: str) -> None:
136136
# override
137137
def emit(self, record: logging.LogRecord) -> None:
138138
"""
139-
Override `logging.Handler.emit` in base class to ensure
140-
`logging.Handler.handleError` is always called and avoid requiring a
141-
`logging.LogRecord` to call internal writing functions.
139+
Implements `logging.Handler.emit` to ensure
140+
`logging.Handler.handleError` is always called and so derived classes
141+
only need to implement `_write` instead of implementing this method.
142142
"""
143143
msg: str = self.format(record) + "\n"
144144
try:
@@ -861,9 +861,8 @@ def setFormatter(self, fmt: Optional[logging.Formatter]) -> None:
861861
# override
862862
def emit(self, record: logging.LogRecord) -> None:
863863
"""
864-
Overrides `logging.Handler.emit` to ensure `logging.Handler.handleError`
865-
is always called and avoid requiring a `logging.LogRecord` to call
866-
internal writing functions.
864+
Overrides `logging.Handler.emit` to ensure the given record is encoded
865+
using CLP IR format before writing to the underlying stream.
867866
868867
:param record: The log event to serialize.
869868
"""

0 commit comments

Comments
 (0)