Skip to content

write to log-file immediatly on every log#378

Open
jcpvdm wants to merge 1 commit intortbrick:devfrom
jcpvdm:logfile-fflush
Open

write to log-file immediatly on every log#378
jcpvdm wants to merge 1 commit intortbrick:devfrom
jcpvdm:logfile-fflush

Conversation

@jcpvdm
Copy link
Contributor

@jcpvdm jcpvdm commented Mar 14, 2026

This helps tracking current state of events when running bngblaster in the background like this:
bngblaster -L log -C blaster.json &> /dev/null &

Before this patch, logs were buffered and not written immediately.

@hannesgredler
Copy link
Member

I'd rather not do this as it will kill performance for hot logging environments. What i'd do instead is to start a periodic timer (100ms) that calls into fflush(); That way you can tune how much delay you want to accept.

@jcpvdm
Copy link
Contributor Author

jcpvdm commented Mar 15, 2026

sounds good @hannesgredler. Perhaps this PR can be closed and you add a commit using the timer method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants