Skip to content

Instantly share code, notes, and snippets.

@markrwilliams
Created February 15, 2017 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markrwilliams/108dd33000b6b20181c17498fa4c2d8c to your computer and use it in GitHub Desktop.
Save markrwilliams/108dd33000b6b20181c17498fa4c2d8c to your computer and use it in GitHub Desktop.
import eliot
import sys
eliot.to_file(sys.stdout)
with eliot.start_action(action_type=u"task"):
eliot.Message.log(key=u"value")
@markrwilliams
Copy link
Author

$ python example.py | eliot-tree
7d074742-0116-4a57-a062-afa05bf13d5d
+-- task@1/started
    `-- timestamp: 2017-02-15 20:14:00.742261
    +-- <UNNAMED TASK>
        |-- key: value
        `-- timestamp: 2017-02-15 20:14:00.742498
    +-- task@3/succeeded
        `-- timestamp: 2017-02-15 20:14:00.742647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment