Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

This article shows, how to read the log from a job and searching to search for a specific string. The next step depends on finding the string in the logfilelog file.

In the example you find a job chain named job_chain_example_search_text The . This job chain has 2 steps.

  • executing of execute myJob
  • examining examine the task log of task myJob. If searchstring the string "looking for text example" exists going to success. Otherwise going to errorin the job output to stdout then the processing is moved to the success state, otherwise to the error state.

This is the job myJob. As you can see it produces the output job_chain_example_search_text:
 

 

This is the job chain with the two steps:
 

 

The second step has the parameters for the search.

 

In the postprocessing post-processing of the second step you see the code for switching to error or to success:
 

 

You can download the example from here: download Example