log errors also in the Fact process step #1456
Open
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.
Currently, errors in the command step of a
Fact
are logged like this:Errors in the process step are raised instead*:
This PR proposes to treat these errors the same as errors in the command step:
I tried to be consistent with the styling of existing command error logging. It might be desirable to also log the full traceback, though. This would need some changes to the current logger setup since passing in
exc_info
tologger.error
vialog_error_or_warning
does not seem to work ATM. I assume this is because of the customLogHandler
/LogFormatter
. Either way, I think the proposed change is an improvement over the current behavior.*the code for
JSONFileContents
is:3.x
at this time)scripts/dev-test.sh
)scripts/dev-lint.sh
)Tests will be added if the proposed changes are actually desired behavior. If not, writing tests now is probably not worth it.
I don't think the documentation needs to change.