zhihuij/log-tailer

Utility class for tailing log files, use JNI to get inode of the file.

★ 9Forks 5JavaGitHub ↗Compare

README

Getting Started

Clone this repo:

git clone https://github.com/onlychoice/log-tailer.git

run

mvn package # or mvn deploy for deploying the package to the maven repository

add the package to the classpath, or use maven dependency:

<dependency>
	<groupId>com.netease.util</groupId>
	<artifactId>log-tailer</artifactId>
	<version>1.0.0</version>
</dependency>

use following code to start the tailer on a file:

Tailer tailer = TailerHelper.createTailer(targetFile, tailListener, 0);
Thread thread = new Thread(tailer);
thread.start();

Contributors

zhihuij

Issues