papertrail / go-tail Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
repro:
touch test.log
./go-tail -F ./test.log &
date > test.log
Fri Sep 15 13:26:55 EDT 2017
mv test.log test.log0 ; touch test.log
open ./test.log: no such file or directory
date >> test.log
# tail is hung/crashed, doesn't exit
Expected: no error, and date to be outputted twice.
Hi - It seems this project unfortunately has no LICENSE file, or any other declaration of how it is licensed.
@snorecone Since you seem to be the primary author - was this intentional, or just oversight?
I'd love to use this library, but can't without the license being clear - appreciate it!
Hello,
My application is crashing after being left for a long period of time (half a day-1 day), it seems to happen when the file is processing high volumes (900+/lines per second). This is on a AMD64 linux system and shows the crash is always a tunix.EpollWait inside fsnotify. Have you seen this before or can recommend a fix?
Also if you need any more detailed information I'm happy to provide it
github.com/papertrail/go-tail/vendor/golang.org/x/sys/unix.EpollWait(0x9, 0xc001877d14, 0x7, 0x7, 0xffffffffffffffff, 0xc00b220168, 0xc001877df4, 0xc001312600)
/Users/keithknott/go/src/github.com/papertrail/go-tail/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go:1220 +0x72
github.com/papertrail/go-tail/vendor/github.com/fsnotify/fsnotify.(*fdPoller).wait(0xc0000141a0, 0xc001877d00, 0x2, 0x0)
/Users/keithknott/go/src/github.com/papertrail/go-tail/vendor/github.com/fsnotify/fsnotify/inotify_poller.go:86 +0x91
github.com/papertrail/go-tail/vendor/github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc0001b4be0)
/Users/keithknott/go/src/github.com/papertrail/go-tail/vendor/github.com/fsnotify/fsnotify/inotify.go:192 +0x18a
created by github.com/papertrail/go-tail/vendor/github.com/fsnotify/fsnotify.NewWatcher
/Users/keithknott/go/src/github.com/papertrail/go-tail/vendor/github.com/fsnotify/fsnotify/inotify.go:61 +0x1e2
goroutine 53 [select]:
github.com/papertrail/go-tail/follower.(*Follower).watchFileEvents(0xc001802c80, 0xc001846000, 0xc0005bed80)
/Users/keithknott/go/src/github.com/papertrail/go-tail/follower/follower.go:294 +0xe8
created by github.com/papertrail/go-tail/follower.(*Follower).follow
/Users/keithknott/go/src/github.com/papertrail/go-tail/follower/follower.go:111 +0x193
Since some software writing logs to a series of files, the newest files may changes while switched to a new file. For this situation, this feature would be helpful.
https://github.com/papertrail/go-tail/blob/master/follower/follower.go#L220 will create a new *time.Timer
for every iteration of the event loop, and this timer will not be cleaned up until its 10 seconds expire. For busy logs, this will be a problem and could explain #9.
Recommend using time.Newtimer
and stopping and resetting it as appropriate
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.