Commit Graph

93 Commits

Author SHA1 Message Date
Sridhar Ratnakumar efd9baa50f add .travis.yml 2014-03-21 22:00:08 -07:00
Sridhar Ratnakumar 039d5571ac changelog update for PR #22 2014-02-22 23:51:39 -08:00
Sridhar Ratnakumar 751a3add5c Merge pull request #22 from GeertJohan/master
Add logging options to config
2014-02-22 23:51:04 -08:00
GeertJohan 3b09eddf4d Removed conig option DisableLogging. Add DiscardingLogger instead. 2014-02-22 15:48:23 +01:00
Geert-Johan Riemer 0c51ff11d1 Add logging options to config 2014-01-30 13:47:28 +01:00
Sridhar Ratnakumar be2914fd12 minor clarification in the Cleanup comment
we are not totally sure if this is an issue in every distro/kernel/environment.
2014-01-04 23:19:15 +05:30
Sridhar Ratnakumar 36ba8bccb9 advance fsnotify pinning to latest stable revision
also flatten the dependency spec using git-clone
2013-11-22 16:45:56 -08:00
Sridhar Ratnakumar c5b73d3485 add NewLine helper to create a Line instance 2013-11-14 09:44:28 -08:00
Sridhar Ratnakumar f3593827b3 Merge pull request #20 from ActiveState/inotify_cleanup
add Cleanup function to close open inotify watches
2013-11-13 17:43:11 -08:00
Sridhar Ratnakumar accbe0dc99 descriptive comment for the Cleanup function 2013-11-13 17:41:13 -08:00
Sridhar Ratnakumar 6ffcd854c1 run 'go fmt' (and fix 'make fmt' in Makefile) 2013-11-13 17:38:23 -08:00
Sridhar Ratnakumar ebc25f9788 update change log 2013-11-13 17:37:03 -08:00
Sridhar Ratnakumar 323e1c0988 add Cleanup function to close open inotify watches
bug: 101635
2013-11-12 20:15:27 -08:00
Sridhar Ratnakumar 7cb0dcdbe1 add deps.json for use with depman 2013-11-07 21:09:27 -08:00
Sridhar Ratnakumar 56c4b221b8 replace the alarmist panic with Fatal
Fatal shows only a single goroutine stacktrace.
2013-10-11 18:19:43 -07:00
Sridhar Ratnakumar 88298d7cf8 Merge pull request #18 from miraclesu/fix_stop_hang
Fix a hang in `Stop` when tailing a non-existent file

Reproducible on linux, but not on mac.
2013-09-23 18:19:18 -07:00
miraclesu 058eb3d8df combine two if conditions 2013-09-24 09:13:19 +08:00
Sridhar Ratnakumar c9444e81ae Merge pull request #17 from presbrey/patch-1
fix race/panic on modify+delete
2013-09-23 11:58:53 -07:00
miraclesu a7f9b4b6fc Fixed stop hang & stop err 2013-09-23 15:03:51 +08:00
presbrey afd80c034c fix race/panic on modify+delete
This fixes a race condition when a file is modified and unlinked in the OS before the inotify IsModify event has a chance to call os.Stat.
2013-09-22 22:51:12 -04:00
Sridhar Ratnakumar 45a47abe0e refactor 2013-09-17 16:54:55 -07:00
Sridhar Ratnakumar 4fb4f2aa10 fulltest: run go install 2013-09-09 03:20:08 +00:00
Sridhar Ratnakumar f3332f1697 fulltest must use the local source, not master 2013-09-09 03:13:12 +00:00
Sridhar Ratnakumar 45e3f1a853 system testing using docker 2013-09-09 03:04:39 +00:00
Sridhar Ratnakumar b87764baaf Merge pull request #14 from QLeelulu/master
add Tell to return the file's current position, like stdio's ftell().
2013-08-24 14:01:07 -07:00
QLeelulu 1a8af20665 add tail.Tell's test 2013-08-24 15:43:25 +08:00
QLeelulu 40bd571489 add Tell to return the file's current position, like stdio's ftell(). 2013-08-23 18:04:21 +08:00
Sridhar Ratnakumar 277b98d6a1 update README 2013-08-09 15:15:40 -07:00
Sridhar Ratnakumar fdc1517c8b Merge pull request #12 from ActiveState/better_location
Ability to seek to anywhere in the file before tailing
2013-08-09 15:10:35 -07:00
Sridhar Ratnakumar 275e6442bd tests for the new Location spec 2013-08-09 14:57:38 -07:00
Sridhar Ratnakumar faf14146e7 tail.Location is now the most customizable
as it is now a tuple; (offset, whence) from os.Seek
2013-08-09 14:53:37 -07:00
Sridhar Ratnakumar 8d9c6e4ce1 allow seeking from beginning and end 2013-08-09 14:42:51 -07:00
Sridhar Ratnakumar 1e2bc8afe8 support arbitrary values for `Location` 2013-07-12 15:30:31 -07:00
Sridhar Ratnakumar 6af3d03d43 typo 2013-07-11 18:36:12 -07:00
Sridhar Ratnakumar 1faae64bdb Merge pull request #10 from ActiveState/rate_limiting
option to limit the rate of reading lines from files
2013-07-11 18:35:26 -07:00
Sridhar Ratnakumar b2509e165e option to limit the rate of reading lines from files 2013-07-11 17:28:18 -07:00
Sridhar Ratnakumar f461ddc97d support Follow=false 2013-05-30 13:18:46 -07:00
Sridhar Ratnakumar 92ad722d56 update readme, comments; gofmt 2013-05-29 16:32:01 -07:00
Sridhar Ratnakumar 4deef2319f Merge pull request #7 from srid/copytruncate_reopen_false
Truncated files must be reopened even if ReOpen is false
2013-05-29 15:26:00 -07:00
Sridhar Ratnakumar 68dffd22b4 fix a regression with truncation detection 2013-05-29 15:08:24 -07:00
Sridhar Ratnakumar de27e252a7 truncate tests should not use ReOpen 2013-05-29 15:08:10 -07:00
Sridhar Ratnakumar 0758578f6c gotail: add -p argument to use polling 2013-05-29 15:07:53 -07:00
Sridhar Ratnakumar 499e541b19 copytruncate should work even if ReOpen is False.
at least, `tail -f` (not `tail -F` which is analogous to ReOpen)
reopens truncated files.

this change introduces the FileChanges struct to abstract the change
notifications for file changes, deletions and truncations.
2013-05-29 14:32:59 -07:00
Sridhar Ratnakumar d3c80d385d refactor code for upcoming changes to tail.go 2013-05-29 13:57:02 -07:00
Sridhar Ratnakumar 2cddd48e0a clean up ChangeEvents' goroutines upon tail.Stop 2013-05-29 11:35:27 -07:00
Sridhar Ratnakumar 7599e3efb9 fix tail.Stop blocking when called in midst of re-opening
this is what caused the test to hang occasionally. after this fix,
test completes in 2mins all the time.

closes issue #4
2013-05-28 19:35:12 -07:00
Sridhar Ratnakumar 0f67bc352f make watch.go its own package
for the purpose for upcoming changes to the watch functionality.
2013-05-28 16:37:21 -07:00
Sridhar Ratnakumar b664e9fc9d Merge pull request #6 from srid/bug99139_copytruncate
copytruncate support,

truncation detection for both inotify and polling file watchers along with test cases, plus a fix for issue #5.
2013-05-28 14:03:12 -07:00
Sridhar Ratnakumar 976fc15b81 update change log, gofmt and remove debug prints 2013-05-28 14:01:32 -07:00
Sridhar Ratnakumar 644891ebbc BlockUntilExists should return immediately if the file already exists
this fixes a potential race condition in the use of BlockUntilExists
following a file existence check (as we do in tail.go:reopen).

closes issue 5
2013-05-28 13:29:40 -07:00