Skip to content

Commit

Permalink
Update settings.rst
Browse files Browse the repository at this point in the history
#fix #11
  • Loading branch information
nalch committed Jan 10, 2020
1 parent d53ff02 commit 00a45a6
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/source/topics/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@ settings.
.. py:attribute:: MESSAGE_HANDLER
Function to process the incoming message by the application.
Takes the original function and should return a tuple of
Takes the original message and request under these names as
keywords and should return a tuple of
* logger name (or None)
* loglevel
* log message
* args for the log call
* kwargs for the log call
def default_handler(log_data):
"""Return the message as is as level INFO on the default logger."""
return None, INFO, log_data.decode(), tuple(), dict()
::
def default_handler(**kwargs):
"""Return the message as is as level INFO on the default logger."""
log_data = kwargs.get('message')
return None, INFO, log_data.decode(), tuple(), dict()
Default
:code:`logging_endpoint.message_handler.default_handler`
Expand Down

0 comments on commit 00a45a6

Please sign in to comment.