Analyze logs

The Logs tab shows the build log of a selected job in a pipeline run. The following section describes how to use the build log (also known as console log) to help classify builds, and to pinpoint the source of build failures.


When you select a job in the left pane, the Logs tab shows you a local copy of the build log. You can then create rules that enable ALM Octane to map specific log messages to build failure classifications, and automatically classify builds based on the build logs.

In the Builds tab, the build failure classification label on a failed build indicates the type of issue that caused the failure. For example, Test code issue, Code issue, and Environment issues. You can use the build failure classification to determine who needs to handle the pipeline run failures and what issues need to be addressed.

Back to top

Create rules to classify build failures automatically

  1. In a pipeline run, open the Logs tab.

  2. In the build log, select a log message to classify.

  3. Click + to add a rule.

  4. Give the rule a meaningful name, such as Illegal Number.

  5. The Rule pattern contains the text from the selected log line.

    Modify the Rule pattern to identify the log lines you want to map to a specific build failure classification.

    Replace parts of the text with wildcards (*) and add a \ before special characters.

    Example: *illegal number*

    As you edit the pattern, the matching text in the Selected log line area is highlighted. You can only save a rule if your pattern highlights the entire line.

  6. Select a classification to assign to log lines that match the pattern.

    Example: Environment - Other

    Tip: Admins can add classification labels to the list using the manual Build Failure Classification button.

  7. Click OK.

    The classification you specified is assigned to:

    • The selected log line in the build log file

    • All log lines that match the rule in future failed build logs.

      If a line matches more than one rule, it is classified by the most recently updated rule.

    All future failed builds are automatically labeled with the first classification mapped in their log.

Back to top

Edit or delete classification rules

When you open a Jenkins build log on ALM Octane, you can see any classification labels that were applied by existing rules. If you are the author of the rule, you can modify or delete it.

You can see and modify all of the build failure classification rules in the ALM Octane settings area. For details, see Manage all build failure classification rules.

To view and change rules in a build log file:

  1. In a pipeline run, open the Logs tab.

  2. In the build log, hover over a specific line's classification label to see whose rule assigned that label.

  3. If you are the author of the rule, click Delete Rule or Edit Rule to make changes to the rule. Otherwise, click the author to send him or her an email about modifying their rule.

    Edit the rule's details as described in Create rules to classify build failures automatically.

What happens when I change a rule that is in use?

If you change a rule's classification, any log line already assigned by this rule is labeled with the new classification.

This affects log files from previous builds, but does not affect the classification of any existing builds. The change in the rule affects the classification of future builds only.

What happens when I delete a rule that is in use?

If you delete a rule that has already assigned a classification to a build log line, the classification is removed from all log files, but remains on any builds is was assigned to.

Back to top

See also: