Class LogFollower

All Implemented Interfaces:
Closeable, AutoCloseable

public class LogFollower extends InputStream
Reads data as is it appended to a log file. If the log file is closed and recreated, which is typical during log rotations, the new file is opened and read from the beginning. The file is assumed to have been replaced when its length is smaller than before.

This class will block on read. If end of file is reached, it will continue to block until data becomes available. End of file is never returned from this class, it will wait indefinitely for data.

AO Industries, Inc.