[Twisted-Python] Announcing Eliot 0.5.0: Structured Logging as Storytelling

Itamar Turner-Trauring itamar at itamarst.org
Thu Oct 23 07:40:35 MDT 2014


 

Eliot provides a structured logging and tracing system for Python that
generates log messages describing a forest of nested actions. Actions
start and eventually finish, successfully or not. Log messages thus tell
a story: what happened and what caused it. 

Eliot has first class support for Twisted, including integration with
Trial. 

Eliot is released by ClusterHQ [2], the Data People for Docker(tm), and
is available at https://pypi.python.org/pypi/eliot [3]. Documentation is
available at https://eliot.readthedocs.org [4]. 

Here's what your logs might look like before using Eliot: 

Going to validate http://example.com/index.html [1].
Started download attempted.
Download succeeded!
Missing <title> element in "/html/body".
Bad HTML entity in "/html/body/p[2]".
2 validation errors found!

After switching to Eliot you'll get a tree of messages with both message
contents and causal relationships encoded in a structured format: 

	* {"action_type": "validate_page", "action_status": "started", "url":
"http://example.com/index.html [1]"} 

 	* {"action_type": "download", "action_status": "started"}
 	* {"action_type": "download", "action_status": "succeeded"}

	* {"action_type": "validate_html", "action_status": "started"} 

 	* {"message_type": "validation_error", "error_type": "missing_title",
"xpath": "/html/head"}
 	* {"message_type": "validation_error", "error_type": "bad_entity",
"xpath": "/html/body/p[2]"}

 	* {"action_type": "validate_html", "action_status": "failed",
"exception": "validator.ValidationFailed"}

 	* {"action_type": "validate_page", "action_status": "failed",
"exception": "validator.ValidationFailed"}

What's New in 0.5.0: 

 	* Added support for Python 3.4.
 	* Most public methods and functions now have underscore-based
equivalents to the camel case versions, e.g. eliot.write_traceback and
eliot.writeTraceback, for use in PEP 8 styled programs. Twisted-facing
APIs and pyunit assertions do not provide these additional APIs, as
camel-case is the native idiom.
 	* eliot.to_file outputs log messages to a file.
 	* Documented how to load Eliot logging into ElasticSearch via
Logstash.
 	* Documentation has been significantly reorganized.

 

Links:
------
[1] http://example.com/index.html
[2] https://docs.clusterhq.com
[3] https://pypi.python.org/pypi/eliot
[4] https://eliot.readthedocs.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20141023/47ad2947/attachment.html>


More information about the Twisted-Python mailing list