mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Disable buffering of the stderr
There are some 3d party libs that are used by clickhouse that uses stderr, for example rdkafka, and buffering of rdkafka logs may be a problem in tests at least.
This commit is contained in:
parent
3a0b77132d
commit
ed4c7820be
@ -547,6 +547,9 @@ void BaseDaemon::initialize(Application & self)
|
||||
std::string stderr_path = config().getString("logger.stderr", log_path + "/stderr.log");
|
||||
if (!freopen(stderr_path.c_str(), "a+", stderr))
|
||||
throw Poco::OpenFileException("Cannot attach stderr to " + stderr_path);
|
||||
|
||||
/// Disable buffering for stderr
|
||||
setbuf(stderr, nullptr);
|
||||
}
|
||||
|
||||
if ((!log_path.empty() && is_daemon) || config().has("logger.stdout"))
|
||||
|
Loading…
Reference in New Issue
Block a user