flori / file-tail Goto Github PK
View Code? Open in Web Editor NEWFile::Tail for Ruby
Home Page: http://flori.github.com/file-tail
License: Apache License 2.0
File::Tail for Ruby
Home Page: http://flori.github.com/file-tail
License: Apache License 2.0
After logrotate(copytruncate), file-tail can't read line for a while.
for example:
I tail a system.log using shell tail. after logrotate , it works well.
I tail a system.log using ruby file-tail. after logrotate, sometimes it can't read line for a while
Hi,
Please update the dependencies to ~> tins 0.5.
Thanks,
Steve
Hi, I'm wondering if file-tail is Unix + Windows or Unix only?
I think it's because the gemspec was removed for v1.0.5.
Here's what I do:
sudo gem install file-tail
irb
irb(main):001:0> require 'rubygems'
irb(main):002:0> require 'file-tail'
LoadError: no such file to load -- file-tail
Using ruby enterprise edition 1.8.7 on OS X 10.6.2.
via a rewind
or self.lineno=0
.
For example, I'm using the following monkey patch now
class File; module Tail
alias old_reopen_file reopen_file
def reopen_file mode; old_reopen_file(mode); rewind if mode == :top; end
end; end
Hi,
On Debian systems, the test test_tail_change2 has a tendency to fail (on my system, it sometimes passes, but fails about half of the time I would say).
The bug is reported there with version 1.1.1, but happens also with 1.2:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912249
Here is the output:
...........F
===============================================================================================
350: end
351: appender.join
352: logger.join
=> 353: assert_equal(110, lines.size)
354: assert reopened
355: assert_equal 10, @in.lineno
356: end
/home/boutil/debian/ruby-team/ruby-file-tail/tests/file_tail_test.rb:353:in `test_tail_change2'
<110> expected but was
<20>
diff:
? 110
? 2
Failure: test_tail_change2(FileTailTest)
===============================================================================================
........
Finished in 24.713305938 seconds.
-----------------------------------------------------------------------------------------------
20 tests, 70 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
95% passed
-----------------------------------------------------------------------------------------------
0.81 tests/s, 2.83 assertions/s
Thanks for any insight about the issue. I can run some commands to help you debugging if needed.
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.