1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 11:22:41 +01:00

framework: set context for loggers

Set context for the loggers of the Runner, the workloads and the
installed instruments and processors. Errors/warnings logged by these
entities will be automatically added as events.
This commit is contained in:
Sergei Trofimov
2017-10-23 12:25:10 +01:00
parent 47d883de09
commit 8dd1e6636c
4 changed files with 8 additions and 4 deletions

View File

@@ -57,6 +57,7 @@ class Job(object):
def initialize(self, context):
self.logger.info('Initializing job {} [{}]'.format(self.id, self.iteration))
with signal.wrap('WORKLOAD_INITIALIZED', self, context):
self.workload.logger.context = context
self.workload.initialize(context)
self.set_status(Status.PENDING)
context.update_job_state(self)