From 148b5495cc589d2a4ddd6c0be67ae7f3dea3ad92 Mon Sep 17 00:00:00 2001 From: lethosor Date: Sat, 11 Apr 2020 01:32:05 -0400 Subject: [PATCH] Fall back to dfout_C if set before stderr.log --- library/Console-posix.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Console-posix.cpp b/library/Console-posix.cpp index 6fb1cbff3..76b5a8cb2 100644 --- a/library/Console-posix.cpp +++ b/library/Console-posix.cpp @@ -903,7 +903,10 @@ void Console::add_text(color_value color, const std::string &text) if (inited) d->print_text(color, text); else - fwrite(text.data(), 1, text.size(), stderr); + { + FILE *out = d->dfout_C ? d->dfout_C : stderr; + fwrite(text.data(), 1, text.size(), out); + } } int Console::get_columns(void)