diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..49f0f9e --- /dev/null +++ b/README.txt @@ -0,0 +1,44 @@ +pygtail +======= + +A python "port" of `logcheck's logtail2 `_. + +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: + .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). diff --git a/debian/changelog b/debian/changelog index cfe4bb6..5a06109 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 05 Jul 2011 15:04:42 -0700 + -- Brad Greenlee 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 Wed, 29 Jun 2011 22:33:12 -0700 + -- Brad Greenlee Wed, 05 Jul 2011 15:04:42 -0700 diff --git a/makedoc.sh b/makedoc.sh new file mode 100755 index 0000000..3907e9b --- /dev/null +++ b/makedoc.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +pandoc -f markdown -t rst -o README.txt README.md diff --git a/pygtail/core.py b/pygtail/core.py index 26c285d..c5682a8 100755 --- a/pygtail/core.py +++ b/pygtail/core.py @@ -29,7 +29,7 @@ import string from optparse import OptionParser -__version__ = '0.2' +__version__ = '0.2.1' class Pygtail(object): """