Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #1808

ANN: Eliot 0.8, the logging system with causality

Path csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <itamar@clusterhq.com>
X-Original-To python-announce-list@python.org
Delivered-To python-announce-list@mail.python.org
X-Spam-Status OK 0.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'received:209.85.223': 0.03; 'sys': 0.05; '<>,': 0.07; 'subject:ANN': 0.07; 'exception:': 0.09; 'url:careers': 0.09; 'python': 0.10; 'exception': 0.13; 'def': 0.13; 'apache': 0.14; '+--': 0.16; 'tells': 0.18; 'try:': 0.18; 'import': 0.24; 'requests': 0.25; 'logging': 0.27; 'message- id:@mail.gmail.com': 0.27; 'container': 0.29; 'raise': 0.29; "we're": 0.30; 'code': 0.30; 'skip:[ 10': 0.31; 'skip:s 30': 0.31; 'url:python': 0.33; 'except': 0.34; 'skip:d 20': 0.34; 'received:google.com': 0.35; 'url:org': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'skip:s 40': 0.38; 'why': 0.39; 'data': 0.39; 'subject:the': 0.39; 'skip:e 20': 0.39; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'more': 0.63; 'license': 0.65; 'skip:\xc2 10': 0.67; '8bit%:100': 0.70; 'url:readthedocs': 0.84; 'interested?': 0.91; 'subject:system': 0.91
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=jGfSCzaLjpm30NPBBSRUeyebz4i8lG6+05QwWQBbJQ0=; b=WNc2LA/ClfWJfx0ACUs1DMCqEQ6Aa0jyWukha9PdvAAXzCqcM+3SEUBN8msVYhblYu SgW45Uw3PY9E9CEAoXQ2ZQbfhoFvi5qByP+1AgZ7zGT28CI2OVNkiS0UKsdS2DcaJIZx do5OERuPaH3IpBUBHk+7jjRmKx32N8UtMCL61SR7cnasYLijnqUwvzmv5j7VD801lPHl H7/tgeA7rPCQRQEIqCkaQ5RFUb13BOdie3jkXn/kaba0tEqhPGRuwHlUopeDADj6CccC iJ2LOAqj9t/iPVVy91TkrhREUUf+EZjYem3FmsEVa9DPC2noaZX7S5b/DTtkfyh9Ynpx mtOg==
X-Gm-Message-State ALoCoQnzS9BzzIRKiBsWE5t9DYmQlrJdMNboWJthcft1qbmIMXCWUJQSfecPKyTCSDYlwQnvaLtP
MIME-Version 1.0
X-Received by 10.107.152.144 with SMTP id a138mr22581746ioe.149.1439233062762; Mon, 10 Aug 2015 11:57:42 -0700 (PDT)
Date Mon, 10 Aug 2015 14:57:42 -0400
Subject ANN: Eliot 0.8, the logging system with causality
From Itamar Turner-Trauring <itamar@clusterhq.com>
To python-announce-list@python.org
X-Mailman-Approved-At Tue, 11 Aug 2015 12:08:17 +0200
Content-Type text/plain; charset=UTF-8
X-Content-Filtered-By Mailman/MimeDel 2.1.20+
X-BeenThere python-announce-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id Announcement-only list for the Python programming language <python-announce-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-announce-list/>
List-Post <mailto:python-announce-list@python.org>
List-Help <mailto:python-announce-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=subscribe>
Approved python-announce-list@python.org
Newsgroups comp.lang.python.announce
Message-ID <mailman.68.1439287698.3627.python-announce-list@python.org> (permalink)
Lines 46
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1439287698 news.xs4all.nl 2911 [2001:888:2000:d::a6]:36458
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python.announce:1808

Show key headers only | View raw


Most logging systems can tell you what happened; Eliot tells you *why* it
happened:

$ python linkcheck.py | eliot-tree
4c42a789-76f5-4f0b-b154-3dd0e3041445
+-- check_links@1/started
    `-- urls: [u'http://google.com', u'http://nosuchurl']
    +-- download@2,1/started
        `-- url: http://google.com
        +-- download@2,2/succeeded
    +-- download@3,1/started
        `-- url: http://nosuchurl
        +-- download@3,2/failed
            |-- exception: requests.exceptions.ConnectionError
            |-- reason: ('Conn aborted', gaierror(-2, 'Name unknown'))
    +-- check_links@4/failed
        |-- exception: exceptions.ValueError
        |-- reason: ('Conn aborted.', gaierror(-2, 'Name unknown'))

And here's the code that generated these logs (eliot-tree
<https://warehouse.python.org/project/eliot-tree/> was used to render the
output):

import sys
from eliot import start_action, to_file
import requests
to_file(sys.stdout)

def check_links(urls):
    with start_action(action_type="check_links", urls=urls):
        for url in urls:
            try:
                with start_action(action_type="download", url=url):
                    response = requests.get(url)
                    response.raise_for_status()
            except Exception as e:
                raise ValueError(str(e))

check_links(["http://google.com"], ["http://nosuchurl"])


Interested? Read more at https://eliot.readthedocs.org/.

Eliot is released under the Apache License 2 by ClusterHQ
<https://clusterhq.com>, the Container Data People. We're hiring!
<https://clusterhq.com/careers/>

Back to comp.lang.python.announce | Previous | Next | Find similar | Unroll thread


Thread

ANN: Eliot 0.8, the logging system with causality Itamar Turner-Trauring <itamar@clusterhq.com> - 2015-08-10 14:57 -0400

csiph-web