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

fw: fix job logging indent

- Have the job manage the indent of each of its stages
- Switch output_processor to using indentcontext
- Move the "Configuring augmentations" log line into Job -- the
  rest of the stages are logged there, but this was done by the
  Executor for some reason.
This commit is contained in:
Sergei Trofimov
2018-05-11 14:39:33 +01:00
committed by Marc Bonnici
parent 98219bbba9
commit 9226a3b92a
3 changed files with 50 additions and 48 deletions

View File

@@ -4,7 +4,7 @@ from wa.framework import pluginloader
from wa.framework.exception import ConfigError
from wa.framework.instrument import is_installed
from wa.framework.plugin import Plugin
from wa.utils.log import log_error, indent, dedent
from wa.utils.log import log_error, indentcontext
from wa.utils.misc import isiterable
from wa.utils.types import identifier
@@ -115,8 +115,7 @@ class ProcessorManager(object):
context.run_output, context.target_info)
def do_for_each_proc(self, method_name, message, *args):
try:
indent()
with indentcontext():
for proc in self.processors:
if proc.is_enabled:
proc_func = getattr(proc, method_name, None)
@@ -129,8 +128,6 @@ class ProcessorManager(object):
if isinstance(e, KeyboardInterrupt):
raise
log_error(e, self.logger)
finally:
dedent()
def _enable_output_processor(self, inst):
inst = self.get_output_processor(inst)