Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Make log output always line-buffered #5589

Merged
merged 2 commits into from
May 5, 2019
Merged

Make log output always line-buffered #5589

merged 2 commits into from
May 5, 2019

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented May 2, 2019

Grid team reports that when reading log output from a client process through a pipe, other clients make it line-buffered (non-default behavior for stdout, which is line-buffered only when attached to tty)

Here I enable flushing after each line in boost.log.

The difference is noticeable when running commands like

>aleth/aleth >aleth.log &
>tail -f aleth.log

cc @evertonfraga

@gumb0 gumb0 requested review from chfast and halfalicious May 2, 2019 17:04
@evertonfraga
Copy link
Member

amazing, @gumb0. thanks a lot!

@codecov-io
Copy link

Codecov Report

Merging #5589 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5589      +/-   ##
==========================================
- Coverage   62.23%   62.21%   -0.02%     
==========================================
  Files         347      347              
  Lines       29136    29137       +1     
  Branches     3295     3295              
==========================================
- Hits        18132    18129       -3     
- Misses       9826     9830       +4     
  Partials     1178     1178

@evertonfraga
Copy link
Member

I just made a build of aleth and it worked as intended. waiting for the RC release ;)

@halfalicious halfalicious merged commit c7006f7 into master May 5, 2019
@halfalicious halfalicious deleted the unbuffered-log branch May 5, 2019 21:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants