Skip to content

Commit

Permalink
Add README.txt file and generator, as PyPi wants RST.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgreenlee committed Jul 6, 2011
1 parent 8a9a11b commit 502277c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 7 deletions.
44 changes: 44 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pygtail
=======

A python "port" of `logcheck's logtail2 <http://logcheck.org>`_.

Pygtail reads log file lines that have not been read. It will even
handle log files that have been rotated.

Usage
-----

From the command line:

::

Usage: pygtail.py [options] logfile

Print log file lines that have not been read.

Options:
-h, --help show this help message and exit
-o OFFSET_FILE, --offset-file=OFFSET_FILE
File to which offset data is written (default:
<logfile>.offset).
-p, --paranoid Update the offset file every time we read a line
(as opposed to only when we reach the end of the
file).

In your code:

::

from pygtail import Pygtail

for line in Pygtail("some.log"):
sys.stdout.write(line)

Notes
-----

Pygtail does not handle rotated logs that have been compressed. You
should configure your log rotation script so that the most recently
rotated log is left uncompressed (``logrotated``, for example, has a
``delaycompress`` option that does just that).
12 changes: 6 additions & 6 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pygtail (0.2) lucid; urgency=low
pygtail (0.2.1) lucid; urgency=low

* Add setup.py and debianize.
* Add ReStructuredText README for PyPi.

-- Brad Greenlee <[email protected]> Wed, 05 Jul 2011 15:04:42 -0700
-- Brad Greenlee <[email protected]> Wed, 06 Jul 2011 12:37:08 -0700

pygtail (0.1) lucid; urgency=low
pygtail (0.2) lucid; urgency=low

* Initial release.
* Add setup.py and debianize.

-- Brad Greenlee <[email protected]> Wed, 29 Jun 2011 22:33:12 -0700
-- Brad Greenlee <[email protected]> Wed, 05 Jul 2011 15:04:42 -0700
3 changes: 3 additions & 0 deletions makedoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

pandoc -f markdown -t rst -o README.txt README.md
2 changes: 1 addition & 1 deletion pygtail/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import string
from optparse import OptionParser

__version__ = '0.2'
__version__ = '0.2.1'

class Pygtail(object):
"""
Expand Down

0 comments on commit 502277c

Please sign in to comment.