Display errors, notices and alerts in debug mode. #3165
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.
There is a significant flaw in the debug setting in config.ini: it ONLY displays debug messages, but not alerts, notices, or errors... thus, turning on debug messages to troubleshoot fatal errors can be a puzzling experience. This PR addresses the problem by displaying ALL log messages when debug mode is turned on.
I imagine there could be debate about whether this should be made more configurable, but my argument is that for complex logging setups, users already have significant flexibility through the [Logging] section of config.ini. If they want to turn on an easy setting to see why something is broken, they should see all available information to get a more complete picture of what is happening.
This PR was inspired by VUFIND-1599, because the FOLIO ILS driver logs errors (instead of debug messages) when it encounters permission errors... and these errors were not visible to the end user in debug mode, making them hard to quickly troubleshoot.