Change default log target to STDERR #74
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Starting Rotonda with a configuration file that contains (some specific) errors and no logging configuration, will exit with only issuing one empty line in the CLI, even if
-vvvv
was issued on many systems (including mine). This depends on the standard logging facility of the system.Setting the default log_target to STDERR instead of the system default makes sure it will always output something on the terminal if no configuration for logging was somehow passed in (or accepted by rotonda). If, on the other hand, users purposefully add log targets that don't do anything, then they are of course on their own.
Since packages for most Linux distros use systemd, and are started with an explicit log facility, I think this is the correct way to do things.
to reproduce:
rotonda -vvvv -c rotonda.example.conf
with
rotonda.example.conf
:Where "my-bagger-filter" does not exist.