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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Changed: [#5559](https://github.com/ethereum/aleth/pull/5559) Update peer validation error messages.
- Changed: [#5568](https://github.com/ethereum/aleth/pull/5568) Improve rlpx handshake log messages and create new rlpx log channel.
- Changed: [#5576](https://github.com/ethereum/aleth/pull/5576) Moved sstore_combinations and static_Call50000_sha256 tests to stTimeConsuming test suite. (testeth runs them only with `--all` flag)
- Changed: [#5589](https://github.com/ethereum/aleth/pull/5589) Make aleth output always line-buffered even when redirected to file or pipe.
- Fixed: [#5562](https://github.com/ethereum/aleth/pull/5562) Don't send header request messages to peers that haven't sent us Status yet.
- Fixed: [#5581](https://github.com/ethereum/aleth/pull/5581) Fixed finding neighbour nodes in Discovery.

Expand Down
3 changes: 3 additions & 0 deletions libdevcore/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ void setupLogging(LoggingOptions const& _options)

boost::shared_ptr<std::ostream> stream{&std::cout, boost::null_deleter{}};
sink->locked_backend()->add_stream(stream);
// Enable auto-flushing after each log record written
sink->locked_backend()->auto_flush(true);

sink->set_filter([_options](boost::log::attribute_value_set const& _set) {
if (_set[severity] > _options.verbosity)
return false;
Expand Down