<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>loggrok</name>
<shortdesc>Simple log analysis library</shortdesc>
<description>I wrote loggrok a while back as I needed a simple library
    for analyzing logs.  I am not actively developing loggrok, but please let me know
    if you find any bugs etc.

    Features include: 
    
    * Simple callback system (loggrok.actions) 
    * Seemless iteration over multiple rollover-index based log files - smartly joins
      broken lines (RollingIndexLogStream)
    * Custom regex-based header and message body matching.

    Example usage:

        &gt;&gt;&gt; from loggrok.actions import Action
        &gt;&gt;&gt; action = Action()
        &gt;&gt;&gt; def printError(entry):
        ...     print 'err!', str(entry)[:-1]
        ...
        &gt;&gt;&gt; action.addLevelCallback('ERROR', printError)
        &gt;&gt;&gt; def printWarning(entry):
        ...     print 'warning!', str(entry)[:-1]
        ...
        &gt;&gt;&gt; action.addLevelCallback('WARN', printWarning)
        &gt;&gt;&gt; from loggrok.log import LogStream
        &gt;&gt;&gt; stream = LogStream(fname)
        &gt;&gt;&gt; stream.action = action
        &gt;&gt;&gt; for entry in stream:
        ...     continue
        ...
        err! blah blah
        warning! blah blah
        err! blah blah

    You can also write your own regexes for matching custom headers:

        &gt;&gt;&gt; from loggrok.parse import HeaderParser, MessageParser
        &gt;&gt;&gt; header_patt = r'^([a-zA-Z]+) ([a-zA-Z]+) &lt;(\d+)&gt; '
        # Entry attributes correspond to groups in regex pattern
        &gt;&gt;&gt; header_attrs = ('foo', 'bar', 'baz')
        &gt;&gt;&gt; header_parser = HeaderParser(header_patt, header_attrs)
        &gt;&gt;&gt; message_patterns = (...) # regexs for message body - after header
        &gt;&gt;&gt; message_attrs = (...) # tuple of attribute tuples corresponding to patters
        &gt;&gt;&gt; messageParser = MessageParser(message_patterns, message_attrs)
        ...
        &gt;&gt;&gt; stream.messageParser = messageParser

    See doctest in tests directory for working examples.

    To run unit tests:

        python runtests.py

    N.B. - loggrok will emit warning related to "broken" CurriedCallable class, though
    it should not cause issues.</description>
<homepage rdf:resource="http://xix.python-hosting.com/#loggrok" />
<maintainer><foaf:Person><foaf:name>Drew Smathers</foaf:name>
<foaf:mbox_sha1sum>b95f9fd562b10f1f3e9248711ed1cab1421fe750</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.2.1</revision></Version></release>
</Project></rdf:RDF>