flâneur — a map of the web's best reading

Actions and Tasks — Eliot 1.14.0+0.g3584072 documentation

eliot.readthedocs.io · 1,404 words · saved by 1 readers

A higher-level construct than messages is the concept of an action. An action can be started, and then finishes either successfully or with some sort of an exception. Success in this case simply means no exception was thrown; the result of an action may be a successful response saying “this did not work”. Log messages are emitted for action start and finish. Actions are also nested; one action can be the parent of another. An action’s parent is deduced from the Python call stack and context managers like Action.context(). Log messages will also note the action they are part of if they can deduce it from the call stack. The result of all this is that you can trace the operation of your code as it logs various actions, and see a narrative of what happened and what caused it to happen. Here’s a basic example of logging an action: This will log an action start message and if the block finishes successfully an action success message. If an exception is thrown by the block then an action fai

Actions and Tasks - Eliot 1.14.0+0.g3584072 documentation --> Docs >> Generating Logs >> Actions and Tasks Edit on GitHub Actions and Tasks ¶ Actions: A Start and a Finish ¶ A higher-level construct than messages is the concept of an action. An action can be started, and then finishes either successfully or with some sort of an exception. Success in this case simply means no exception was thrown; the result of an action may be a successful response saying “this did not work”. Log messages are emitted for action start and finish. Actions are also nested; one action can be the parent of another.

Explore this link on the map →

related reading