Structured, action-oriented logging is a great help when debugging problems. For example, here are the combined logs of a request originating from a client process being sent to a server. Notice how easy it is to figure out the cause of the problem, even though it's opaque to the client:
process='client' task_uuid='40be6df2' task_level=[1] action_type='main' action_status='started' process='client' task_uuid='40be6df2' task_level=[2, 1] action_type='http_request' action_status='started' x=5 y=0 process='server' task_uuid='40be6df2' task_level=[2, 2, 1] action_type='eliot:remote_task' action_status='started' process='server' task_uuid='40be6df2' task_level=[2, 2, 2, 1] action_type='divide' action_status='started' x=5 y=0 process='server' task_uuid='40be6df2' task_level=[2, 2, 2, 2] action_type='divide' action_status='failed' exception='exceptions.ZeroDivisionError' reason='integer division or modulo by zero' process='server' task_uuid='40be6df2' task_level=[2, 2, 3] action_type='eliot:remote_task' action_status='failed' exception='exceptions.ZeroDivisionError' reason='integer division or modulo by zero' process='client' task_uuid='40be6df2' task_level=[2, 3] action_type='http_request' action_status='failed' exception='requests.exception.HTTPError' reason='500 Server Error: INTERNAL SERVER ERROR' process='client' task_uuid='40be6df2' task_level=[3] action_type='main' action_status='failed' exception='requests.exception.HTTPError' reason='500 Server Error: INTERNAL SERVER ERROR'
Incompatible output format change! In previous versions the ordering of messages and actions was ambiguous and could not be deduced from out-of-order logs, and even where it was possible sorting correctly was difficult. To fix this the action_counter field was removed and now all messages can be uniquely located within a specific task by the values in an improved task_level field.
Features:
Bug fixes:
Downloads are available on PyPI.
Documentation can be found on Read The Docs.
Bugs and feature requests should be filed at the project Github page.
You can ask for help on IRC at the #eliot channel on irc.freenode.net.