Closed DavidLegg closed 3 months ago
One slight correction to that note on the errors
and numberOfErrors
resources - We actually had numberOfErrors
already, just derived in a different way. This PR does remove errors
itself, though, so I agree we should put that in the release notes just in case.
Description
Adds a Logger class to the streamline framework, which uses topics to emit log messages directly as events. Also builds such a Logger when the Registrar is initialized, and reconfigures errors to go to that logger when the error behavior is set to LOG. Before this, errors were collected awkwardly into a discrete string resource.
Verification
Since the logger is connected to the Registrar's error behavior, this was tested using the streamline-demo example model. By adding "CauseError" activities to the plan, we can trip the resource error handling machinery, and verify that appropriate error messages appear in the Simulation Events tab.
Documentation
None yet - #1494 should probably be updated to tell users how to use the logger in their model/activities.
This does remove the
errors
resource, but it leaves thenumberOfErrors
resource intact, which we should note for any users who may have depended onerrors
.Future work
None planned