Giter Site home page Giter Site logo

nomis-tailer's Introduction

nomis-tailer

A Clojure library for tailing growing files. Understands rollover.

Good for tailing log files.

Similar to tail -F in some Unix's.

You have this in core.clj: ;;;; FIXME Need to fix doc strings. Maybe the README also.

Usage

Dependencies

Dependency information is at this clickable badge:

Clojars Project

Add the following to your ns declaration:

(:require [nomis-tailer.core :as tailer])

Tailing a Single File

Use tailer/make-single-file-tailer to create a single-file-tailer.

The tailing starts from the end of the file.

Use tailer/channel to get a core.async channel to take from. The values taken will be successive lines from the file.

Use tailer/close! to close a single-file-tailer.

Tailing Using a File Pattern

Use tailer/make-multi-file-tailer to create a multi-file-tailer.

Looks for the most recent file in dir that matches pattern and looks for new files every file-change-delay-ms.

The tailing starts from the end of any current file, and includes the full content of subsequent files.

Use tailer/channel and tailer/close! as for a single-file-tailer.

More Detail

See doc strings for more detail.

License

Copyright © 2016 Simon Katz

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

nomis-tailer's People

Contributors

simon-katz 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.