LogInit: default to stderr on Windows
Don't require "log_file" setting, for "--no-config" operation. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1600
This commit is contained in:
parent
38704c9cf3
commit
84f43ccde8
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
||||||
ver 0.23.10 (not yet released)
|
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)
|
ver 0.23.9 (2022/08/18)
|
||||||
* input
|
* input
|
||||||
|
|
|
@ -163,7 +163,10 @@ log_init(const ConfigData &config, bool verbose, bool use_stdout)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#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");
|
throw std::runtime_error("config parameter 'log_file' not found");
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYSLOG
|
#ifdef HAVE_SYSLOG
|
||||||
|
|
Loading…
Reference in New Issue