Skip to content

lost logs when append data quickly after truncate #145

Open
@HeChuanXUPT

Description

@HeChuanXUPT

config

tail.Config{
	Follow:    true,
	Poll:      true,
	ReOpen:    false,
	MustExist: true,
	Location: &tail.SeekInfo{0, os.SEEK_END}})

case 1, OK

$ echo "test log 1" >> test.log
$ >test.log
$ echo "test log 2" >> test.log

can get 2 lines

case 2, MISS

$ echo "test log 1" >> test.log
$ >test.log && echo "test log 2" >> test.log

will miss the second log

env

system:windows 7 64bit
branch: master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions