diff --git a/NEWS b/NEWS index e6599e05e..f3ea930d7 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.23.10 (not yet released) +* Windows + - log to stdout by default, don't require "log_file" setting ver 0.23.9 (2022/08/18) * input diff --git a/src/LogInit.cxx b/src/LogInit.cxx index 7aeb069d3..97bf092c8 100644 --- a/src/LogInit.cxx +++ b/src/LogInit.cxx @@ -163,7 +163,10 @@ log_init(const ConfigData &config, bool verbose, bool use_stdout) return; } #endif -#ifndef HAVE_SYSLOG +#ifdef _WIN32 + /* default to stdout on Windows */ + out_fd = STDOUT_FILENO; +#elif !defined(HAVE_SYSLOG) throw std::runtime_error("config parameter 'log_file' not found"); #endif #ifdef HAVE_SYSLOG