Skip to content

Multiline-write results in unexpected behavior #2

@petski

Description

@petski

An issue reveals itself if the process writing to the tail'ed logfile writes more than one line in a write().

To reproduce:

$ echo 1 >> /tmp/myfile
$ echo 2 >> /tmp/myfile
$ echo -e "3\n4" >> /tmp/myfile
$ echo 5 >> /tmp/myfile

I fixed this by patching line 37

37              #print fh.readline().rstrip()
38              for line in fh.readlines():
39                  print line.rstrip()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions