Giter Club home page Giter Club logo

Comments (5)

l15k4 avatar l15k4 commented on August 23, 2024

After debugging the test spec I found out that it is actually behaves the way one would expect, which makes it very useful. I got confused because It is quite unexpected that after following sequence of events :

file.rename(...)
out = new FileWriter(file)
out.write(s)

it is still writing to the original destination instead of the new one. I hope it will behave the same way if I try to move the file on unix filesystem.

from tailf.

alaz avatar alaz commented on August 23, 2024

Hi Jakub,

As far as I remember the code is written to always read from the file with given name. file, not file handle. So the code tries to open the same file name after the previous file seems rotated.

I'm looking forward to hearing what your investigation will reveal :)

from tailf.

l15k4 avatar l15k4 commented on August 23, 2024

Well it works as expected, except for when you try something like this:

Source.fromInputStream(Tail.follow(existingFile)).getLines()

and write to that file, it sleeps. I'll have to tweak it some way or another or I will use it directly.

from tailf.

l15k4 avatar l15k4 commented on August 23, 2024

I miss used that, it all works as expected, even when using Scala's BufferedSource. Thank you so much Alex !

from tailf.

alaz avatar alaz commented on August 23, 2024

Good to know everything is ok. Thanks for letting know!

from tailf.

Related Issues (2)

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.