PiRSquared17 / snaketail-net

Automatically exported from code.google.com/p/snaketail-net
1 stars 0 forks source link

Additional newline displayed #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Execute a long running command with output redirection to a file in a 
cmd.exe box (e.g. md5sum -c test.md5 > test.log)
2. Monitor the test.log in a snaketail

What is the expected output? 
MD5 pass: disk2\disk2-f015.vmdk
MD5 pass: disk2\disk2-f016.vmdk
MD5 pass: disk2\disk2-f017.vmdk
MD5 pass: disk2\disk2-f018.vmdk
MD5 pass: disk2\disk2-f019.vmdk
MD5 pass: disk2\disk2-f020.vmdk
MD5 pass: disk2

What do you see instead?
MD5 pass: disk2\disk2-f015.vmdk
MD5 pass: disk2\disk2-f016.vmdk
MD5 pass: disk2\disk2-f017.vmdk
MD5 pass: d
isk2\disk2-f018.vmdk
MD5 pass: disk2\disk2-f019.vmdk
MD5 pass: disk2\disk2-f020.vmdk
MD5 pass: disk2

What version of the product are you using
v1.6.0

On what operating system?
Windows 7 64bit

Please provide any additional information below.
When the logfile is updated, snaketail detects it and displays the new 
information, but it always add an additional newline.

Original issue reported on code.google.com by esteev...@gmail.com on 28 Nov 2011 at 10:34

GoogleCodeExporter commented 9 years ago
I have reproduced this issue, and the problem is that SnakeTail is using 
StreamReader and ReadLine(). And if the application writing to log is not 
writing one line at time but writing a few characters, then it is possible for 
SnakeTail to call ReadLine() and read a partial line, and when calling 
ReadLine() again it reads other part.

I'm working on changing the SnakeTail log-reader interface, so it supports 
applications that writes log lines incrementally.

Original comment by sweaty1 on 28 Nov 2011 at 8:55