Tailing library for Crystal - get and/or follow the end of a file/IO
Inotify.cr library is used to watch files.
Add the dependency to your shard.yml
:
dependencies:
exec:
github: j8r/tail.cr
require "tail"
Tail::File.open "file", &.follow do |str|
print str
end
Tail::File.open "file", &.last_lines
Copyright (c) 2018-2020 Julien Reichardt - ISC License