Skip to content

Commit

Permalink
fix wrong docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
s-martin committed Dec 26, 2023
1 parent 0c4ad4f commit 9176013
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
19 changes: 9 additions & 10 deletions documentation/developers/docstring/docstring-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,22 +626,21 @@ def __init__(enable=True, color_levelname=True)
class PubStream()
```

"

Stream handler wrapper around the publisher for logging.StreamHandler

Allows logging to send all log information (based on logging configuration)
to the Publisher.

ATTENTION: This can lead to recursions!

Recursions come up when
(a) Publish.send / PublishServer.send also emits logs, which cause a another send, which emits a log,
which causes a send, .....
(b) Publisher initialization emits logs, which need a Publisher instance to send logs
> [!CAUTION]
> This can lead to recursions!
> Recursions come up when
> * Publish.send / PublishServer.send also emits logs, which cause a another send, which emits a log,
> which causes a send, .....
> * Publisher initialization emits logs, which need a Publisher instance to send logs

IMPORTANT: To avoid endless recursions: The creation of a Publisher MUST NOT generate any log messages! Nor any of the
functions in the send-function stack!
> [!IMPORTANT]
> To avoid endless recursions: The creation of a Publisher MUST NOT generate any log messages! Nor any of the
> functions in the send-function stack!


<a id="misc.loggingext.PubStreamHandler"></a>
Expand Down
19 changes: 10 additions & 9 deletions src/jukebox/misc/loggingext.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,22 @@ def filter(self, record):


class PubStream:
""""
"""
Stream handler wrapper around the publisher for logging.StreamHandler
Allows logging to send all log information (based on logging configuration)
to the Publisher.
ATTENTION: This can lead to recursions!
Recursions come up when
(a) Publish.send / PublishServer.send also emits logs, which cause a another send, which emits a log,
which causes a send, .....
(b) Publisher initialization emits logs, which need a Publisher instance to send logs
> [!CAUTION]
> This can lead to recursions!
> Recursions come up when
> * Publish.send / PublishServer.send also emits logs, which cause a another send, which emits a log,
> which causes a send, .....
> * Publisher initialization emits logs, which need a Publisher instance to send logs
IMPORTANT: To avoid endless recursions: The creation of a Publisher MUST NOT generate any log messages! Nor any of the
functions in the send-function stack!
> [!IMPORTANT]
> To avoid endless recursions: The creation of a Publisher MUST NOT generate any log messages! Nor any of the
> functions in the send-function stack!
"""
def __init__(self):
self._topic = 'core.logger'
Expand Down

0 comments on commit 9176013

Please sign in to comment.