Closed wesleymv closed 2 years ago
Hello @wesleymv
nLines
gives you the starting point. If more lines are appended to the file, they will be then emitted.
Are the multiple lines tailed when the file changes new lines? Or are lines from the file before start tailing the file?
Hi @lucagrulla
The lines I get are in the old file. For example, 1.log contains:
1
2
3
when I add 4, this is the output:
31
2
3
if I remove the nLines and run the same steps (seems to omit last line):
1
2
3
How are lines added?
The underline NodeJS core library is sometimes platform dependent. Are the new lines added via an app, like notepad, or with a different mechanism?
On Wed, 21 Jul 2021 at 18:45, wesleymv @.***> wrote:
Hi @lucagrulla https://github.com/lucagrulla
The lines I get are in the old file. For example, 1.log contains: 1 2 3
when I add 4, this is the output:
31 2 3
if I remove the nLines and run the same steps (seems to omit last line):
1 2 3
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/lucagrulla/node-tail/issues/140#issuecomment-884293324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQ6JVGZSJAXWNB2QEX2X3TY3TSFANCNFSM5AYDPYXA .
Fixed with v2.2.4
I am trying to use the nLines option, but it does not seem to work. When the file is modified, it brings more than one line.
Here is the code I am using:
When it starts, it brings one line. But, brings many lines when file is modified.
I am sorry if this is just the wrong use of the library.
Thank you in advance