1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-03 03:42:35 +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

@@ -286,13 +286,13 @@ class Executor(object):
self.logger.info('Installing instrumentation')
for instrument in config_manager.get_instruments(self.target_manager.target):
instrumentation.install(instrument)
instrumentation.install(instrument, context)
instrumentation.validate()
self.logger.info('Installing result processors')
pm = ProcessorManager()
for proc in config_manager.get_processors():
pm.install(proc)
pm.install(proc, context)
pm.validate()
self.logger.info('Starting run')
@@ -342,6 +342,7 @@ class Runner(object):
def __init__(self, context, pm):
self.logger = logging.getLogger('runner')
self.logger.context = context
self.context = context
self.pm = pm
self.output = self.context.output