mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-07-08 16:13:27 +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:
wa/framework
@ -33,10 +33,11 @@ class ProcessorManager(object):
|
||||
self.logger = logging.getLogger('processor')
|
||||
self.processors = []
|
||||
|
||||
def install(self, processor):
|
||||
def install(self, processor, context):
|
||||
if not isinstance(processor, ResultProcessor):
|
||||
processor = self.loader.get_result_processor(processor)
|
||||
self.logger.debug('Installing {}'.format(processor.name))
|
||||
processor.logger.context = context
|
||||
self.processors.append(processor)
|
||||
|
||||
def validate(self):
|
||||
|
Reference in New Issue
Block a user