You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mx...@apache.org on 2017/04/24 10:55:27 UTC
[6/9] incubator-ariatosca git commit: modified executions logging
modified executions logging
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/0d5ff7f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/0d5ff7f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/0d5ff7f4
Branch: refs/heads/ARIA-146-Support-colorful-execution-logging
Commit: 0d5ff7f46282094c1f01edba230d5b0a8d1235d0
Parents: f91adbc
Author: max-orlov <ma...@gigaspaces.com>
Authored: Sat Apr 22 11:09:15 2017 +0300
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Mon Apr 24 11:47:11 2017 +0300
----------------------------------------------------------------------
aria/cli/commands/executions.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0d5ff7f4/aria/cli/commands/executions.py
----------------------------------------------------------------------
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index 3eb53ab..a156c3f 100644
--- a/aria/cli/commands/executions.py
+++ b/aria/cli/commands/executions.py
@@ -20,6 +20,7 @@ from .. import table
from .. import utils
from .. import logger as cli_logger
from .. import execution_logging
+from .. import color
from ..core import aria
from ...modeling.models import Execution
from ...orchestrator.workflow_runner import WorkflowRunner
@@ -165,9 +166,13 @@ def start(workflow_name,
execution_thread.raise_error_if_exists()
execution = workflow_runner.execution
- logger.info('Execution has ended with "{0}" status'.format(execution.status))
+ status_msg = 'Execution has ended with "{0}" status'.format(execution.status)
+ status_msg = color.StyledString(status_msg, color.StyledString.FORE.RED)
+ logger.info(status_msg)
if execution.status == Execution.FAILED and execution.error:
- logger.info('Execution error:{0}{1}'.format(os.linesep, execution.error))
+ error_msg = color.StyledString('Execution error:{0}{1}'.format(os.linesep, execution.error),
+ color.StyledString.FORE.RED)
+ logger.info(error_msg)
if dry:
# remove traces of the dry execution (including tasks, logs, inputs..)