From 49ccfc86bdd635c551e841eb238456f8ec552637 Mon Sep 17 00:00:00 2001 From: Andrei Maiboroda Date: Thu, 2 May 2019 18:42:32 +0200 Subject: [PATCH 1/2] Force log output to be line-buffered (even when redirected to non-tty) --- libdevcore/Log.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libdevcore/Log.cpp b/libdevcore/Log.cpp index 0506435de40..0517bb36465 100644 --- a/libdevcore/Log.cpp +++ b/libdevcore/Log.cpp @@ -133,6 +133,9 @@ void setupLogging(LoggingOptions const& _options) boost::shared_ptr 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; From 620159a73acf15067f51c686273eea2e2e4e893d Mon Sep 17 00:00:00 2001 From: Andrei Maiboroda Date: Thu, 2 May 2019 18:59:00 +0200 Subject: [PATCH 2/2] Add changelog item --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f61a4ca3979..3a3d271db01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.