lucagrulla / node-tail

The zero dependency Node.js module for tailing a file
https://www.lucagrulla.com/node-tail/
MIT License
467 stars 75 forks source link

delete data after read? #153

Closed digitalml closed 1 year ago

digitalml commented 2 years ago

This is a really great library, thank you for making it.

I'm using this is a named pipe mechanism for two node apps. The first node app streams data into the named pipe and the second node app uses tail to read from it in real time. The problem I'm facing is that the named pipe file is getting very large through the day. Is there a way to have tail remove the line from the named pipe file it's read?

Thanks

lucagrulla commented 2 years ago

If it doesn't happen already, no, it's not possible. I assume that the low-level mechanism used to retrieve content is not flushing the buffer.