Giter Club home page Giter Club logo

tayler's Introduction

Tayler

Tayler is a log tailing implementation forked from Apache Commons IO, providing improved performances, bug fixes, cleaner APIs and a codebase which will be actively maintained and developed :)

Usage

First, you need to implement the tayler.TailerListener or tayler.TailerListenerAdapter, providing an implementation for the following API methods:

  • init: called on listener initialization.
  • handle: called at each line handling.
  • fileNotFound: called if the tailed file is not found.
  • fileRotated: called if the tailed file is rotated.
  • error: called in case of tail/handling errors.
  • stop: called after stopping tailer.

Then, you just create a tayler.Tailer object by specifying the following constructor arguments:

  • file: the log file to tail.
  • listener: the previously implemented listener.
  • delay: the tail delay time, in milliseconds.
  • end: a boolean specifying if tailing from start or end of file.
  • bufferSize: the size of the buffer for buffered reads, in bytes.

The tayler.Tailer object is indeed a Runnable, so the final step is to start a thread or submit it to an executor in order to actually start tailing. That's it.

Download

Tayler is a self-contained jar you can download from the Downloads section above.

If you're a Maven user, you can also configure Tayler on your project by importing the Clojars repository:

<repository>
    <id>clojars.org</id>
    <url>http://clojars.org/repo</url>
</repository>

And then declaring the dependency:

<dependency>
    <groupId>tayler</groupId>
   <artifactId>tayler</artifactId>
   <version>1.1</version>
</dependency>

Feedback

Contact me on twitter.

License

Distributed under the Apache Software License.

tayler's People

Contributors

sbtourist avatar

Watchers

James Cloos avatar KwonYoung, Kim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.