ozontech / ozontech/file.d

Bug: skips last line without new line

Open
#912 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
504
Forks
263
Avg merge
4d 2h
Merged PRs (30d)
5

Description

Describe the bug

sample of a log file

{"message":"1"}
{"message":"2"} # !!! without \n

i am not getting two messages. only first

To Reproduce
Steps to reproduce the behavior:

  1. run file.d to process sample log file

Expected behavior
in stdout i get only one message

{"message":"1"}

but i expect two messages

{"message":"1"}
{"message":"2"}

after adding new i get two messages

Additional context
Version: v0.71.0
Platform: linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided two-line log sample and the file.d configuration referenced in the report. Trace the file input handling to determine why a final line without a newline is skipped; done means both messages are emitted, including when the file ends without a newline.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.