forked from bgreenlee/pygtail
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add README.txt file and generator, as PyPi wants RST.
- Loading branch information
Showing
4 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters