handle std err
Demo the shell func will capture both stdout and stderr and print out them
Demo
source
Main task yaml file
tasks:
- name: task
task:
- func: shell
do:
- ./tests/functests/mock_error.sh
Main log file
loading [Config]: ./tests/functests/upconfig.yml
Main config:
Version -> 1.0.0
RefDir -> ./tests/functests
WorkDir -> cwd
AbsWorkDir -> /up_project/up
TaskFile -> f0178
Verbose -> vvv
ModuleName -> self
ShellType -> /bin/sh
MaxCallLayers -> 8
Timeout -> 3600000
MaxModuelCallLayers -> 256
EntryTask -> task
ModRepoUsernameRef ->
ModRepoPasswordRef ->
work dir: /up_project/up
-exec task: task
loading [Task]: ./tests/functests/f0178
module: [self], instance id: [dev], exec profile: []
profile - envVars:
(*core.Cache)({
})
Task1: [task ==> task: ]
-Step1:
self: final context exec vars:
(*core.Cache)({
"up_runtime_task_layer_number": 0
})
cmd( 1):
./tests/functests/mock_error.sh
-
executing workflow .......
step 1 .......
step m .......
encountering an error ......
error 1 ......
error 2 ......
./tests/functests/mock_error.sh: exit: line 11: Illegal number: -1
-
.. failed(suppressed if it is not the last step)
WARN: [Not rescued in task level] - [please assess the panic problem and cause, fix it before re-run the task]
task finally -> ERROR: Failed And Not Ignored! [You may want to continue and ignore the error]
Logs with different verbose level
Raw logs with different verbose level