Coder Social home page Coder Social logo

Comments (6)

lucagrulla avatar lucagrulla commented on May 26, 2024

Hi @irickt,

Thanks for the suggestion. I kind of see what you are trying to add but I struggle to find a use case. Do you have one so I can fully understand your suggestion?

Thanks! :-)

from node-tail.

 avatar commented on May 26, 2024

The use case is debugging by tailing a log file containing json and parsing on the fly. The process didn't write the newline until the next log item so a newline separator failed to give the latest line. As a workaround I tried separator="" and it almost worked except tail was not returning the last } so the parser didn't yield the object. A corner case to be sure!

I ended up with this https://github.com/irickt/tailf using a fork of node-tail.

from node-tail.

lucagrulla avatar lucagrulla commented on May 26, 2024

Thanks for the explanation.

I guess I need to handle the last character properly before adding the feature to the library. I'll have a look at your fork and possibly add your suggestion and handle the corner case if possible.

Thanks again.

from node-tail.

dceejay avatar dceejay commented on May 26, 2024

Did you ever get round to thinking about this ?
It would also be useful for tailing binary files which by their nature could contain any character - so you ideally want to just spit out the whole new chunk that arrives... including the last character, but at least if it sent every character one at a time (as now) it would be ok.

from node-tail.

lucagrulla avatar lucagrulla commented on May 26, 2024

Hi @dceejay,

No I have not solved this.

from node-tail.

lucagrulla avatar lucagrulla commented on May 26, 2024

Fixed with release 1.4.0. To avoid buffering just pass null as parameter in the constructor.

from node-tail.

Related Issues (20)

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.