mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 04:21:17 +00:00
fda418093d
Rather than relying on a custom Logger with a context to add events when they are logged, have the runner register hooks for corresponding signals that do that. The issue with the previous approach is that the event ended up being added too late -- after the current job was already cleared, so all events were added at run level. With the new approach, the event will be added when it is first logged, while there is still a current job being set. There will be no duplication for Exceptions being re-raised and handled at different levels because log_error() will ensure that each Exception is logged only once.