Closed HeikoSchlittermann closed 1 year ago
What is the use case for logging to stderr? For stdout a pretty common name would be "-", that is --log -
.
I currently do not have a use case for logging to STDERR. I suggested it for both (stderr, stdout) just for completeness. Logging to STDOUT though I have a use case for: I'd like to have Systemd capture all the output. Depending on the invocation, rest-server
can't (re)open STDOUT (permissions).
I'm fine with --log -
too. But IMHO --log stdout
is more self-explanatory. (Using --log /dev/stdout
with built-in magic would assume, that /dev/stdout
is identical to the STDOUT provided by the caller.)
What is the purpose of this change? What does it change?
The --log option accepts "stdout", "stderr" as filenames. This prevents rest-server from opening these files, it simply writes the logs to the STDOUT or STDERR stream provided by the caller.
BREAKING in case the user really used "stdout", "stderr" to specify file names, you'll need to update your rest-server invocation to use "./stdout", "./stderr".
Was the change discussed in an issue or in the forum before?
No.
Checklist
changelog/unreleased/
that describes the changes for our users (template here)gofmt
on the code in all commits