Filetrack
Filetrack is a library for persistent reading of logs similar to the mechanisms used in Filebeat and other software alike. It provides a few useful primitives for working with IO and its main intention is to be used for implementation of custom log processors.
Multireaderthat lets you work with a list of readers as if you had one single buffer
# use ;
# use Multireader;
let inner_items = vec!;
// we get result here because Multireader performs seek
// (fallible operation) under the hood to determine sizes
let mut reader = new?;
# let mut buf = vec!;
reader.read_to_end?;
assert_eq!
# Ok::
TrackedReaderthat allows to read logs or any other content from rotated files with offset persisted across restarts
// running this program multiple times will output next line on each execution
# use BufRead;
# use TrackedReader;
let mut reader = new?;
# let mut input = Stringnew;
match reader.read_line? ;
# Ok::
See documentation for examples and working principles.