Log Parser plugin

The Log Parser plugin parses log files on the Deployment Automation agent side and provides an output log file with the results.

Overview

Use this plugin to parse log files from products that you are executing through your process steps. For example, to put a conditional step in your process to check for a specific completion code that is stored in a log, you can use Log Parser to do that.

To use the plugin's steps, open the process designer and navigate to Utilities > LogParser in the Tools pane.

This plugin has the following steps:

The agent processes logs as follows:

  • Logs are uploaded to the server after each step is executed and are stored on the agent side until the whole process is finished.
  • The log file for each step has a distinct path to avoid conflicts with any other process running on the agent at the same time.
  • Deployment Automation doesn't prevent deletion of the log files of a currently running process. If this situation occurs, the deleted files are skipped during the log file deletion in the end of the process run.

Default built-in properties for Include Files in the Log Parser steps:

Property Description
prevStep

This property enables you to access previous step values without having to explicitly fill in the previous step name.

You can provide a property expression in the following format where prevStep resolves to the value of the previous step name:

${p:prevStep/propName}

All properties of the previous step that are accessible with the full syntax are accessible through the prevStep property.

Caution: If a step has multiple possible previous steps in a conditional process design, the results can be unpredictable.

logPath

This property is an output property that resolves to the full path of a given step's log file during the process run.

If you specify the property expression in the following format, the values resolve to the value of the previous step name and the log path for that step:

${p:prevStep/logPath}

Back to top

Step: RegExp Search

This step parses log files on the Deployment Automation agent side using regular expression rule matching and provides an output log file with the results.

Required properties:

Property Description
Include Files

Specify the list of files to parse, relative to the base directory. Wildcards can be used. Specify multiple file paths as a new-line-separated list.

Default value: ${p:prevStep/logPath}

Rules

Specify a new-line-separated list of rules to apply to the contents of the file. Use the following format:

RuleName=RegularExpression

where RuleName is the name of the rule to assign to a line if the line matches the regular expression specified in RegularExpression.

For example:

ORA_MESSAGES=ORA-\d\d\d\d

finds all the lines containing the regular expression

ORA-\d\d\d\d

and assign it to the rule name

ORA_MESSAGES

Rules are applied to each log line in the order of appearance in this field.

Optional properties:

Property Description
Base Directory

Specify the root directory where log parsing is performed.

Exclude Files Specify the list of files to exclude from selection, relative to the base directory. Wildcards can be used. Specify multiple file paths as a new-line separated list.
Output Path Specify the file path where to save the resulting output. If no file is specified, the result is saved in the console output.
Group By Select the way you want the output to be grouped. Values are:
  • None
  • Group name
  • File path
Output Format

Specify the output format of each line in the output log. Special properties can be used in this field. Each special property should be specified in the following format:

${propName}

Allowed properties:

  • Line
  • LineNumber
  • FileName
  • FilePath
  • GroupName
  • RegExp

Default value:

\t${FileName}:${LineNumber} - ${Line}

Fail If No Files Found

Select this to cause the step to fail if no files matching the include and exclude file filters are found in the base directory.

Default value: Not selected

Back to top

Step: Convert to HTML

This step parses log files on the Deployment Automation agent side and provides an HTML file containing log contents and search results.

Required properties:

Property Description
Include Files

Specify the list of files to parse, relative to the base directory. Wildcards can be used. Specify multiple file paths as a new-line-separated list.

Default value: ${p:prevStep/logPath}

Output Path Specify the output file path for the resulting HTML file.
Rules

Specify a new-line-separated list of rules to apply to the contents of the file. Use the following format:

RuleName=RegularExpression

where RuleName is the name of the rule to assign to a line if the line matches the regular expression specified in RegularExpression.

For example:

ORA_MESSAGES=ORA-\d\d\d\d

finds all the lines containing the regular expression

ORA-\d\d\d\d

and assign it to the rule name

ORA_MESSAGES

Rules are applied to each log line in the order of appearance in this field.

Optional properties:

Property Description
Base Directory

Specify the root directory where log parsing is performed.

Exclude Files Specify the list of files to exclude from selection, relative to the base directory. Wildcards can be used. Specify multiple file paths as a new-line-separated list.
Group By Select the way you want the output to be grouped. The options are None, Group name, File path.
Output Format

Specify the output format of each line in the output log. Special properties can be used in this field. Each special property should be specified in the following format:

${propName}

Allowed properties:

  • Line
  • LineNumber
  • FileName
  • FilePath
  • GroupName
  • RegExp

Default value:

\t${FileName}:${LineNumber} - ${Line}

Fail If No Files Found

Select this to cause the step to fail if no files are found that match the include and exclude file filters in the base directory.

Default value: Not selected

Set Colors

Specify the list of highlight colors to apply to the corresponding rules. The format of the field is:

RuleName

where RuleName is the name you assigned in the Rules property.

You can set one color per rule. Colors are specified in hex format, for example:

ERROR=#FF0000
WARNING=#FF8040
SUCCESS=#008000

Back to top

See also: