Smart Log

For any invocation you can either use predefined filter sets for specific tools, or define your own filters and style maps in order to view the simulation output like the one below.

../../_images/vlogdt-vmm-smart-log1.png

Smart Log - Filters

To define a new filter for a DVT Generic run configuration go to the Filters Tab, click New… and specify filter parameters.

../../_images/vlogdt-external-smart-log-new-filter.png

The main filter parameters are:

  • Name - The name of the filter

  • Severity - The severity of the filter.

  • Pattern - The filter pattern. Use ${file} to indicate a file hyper-link, and ${line} to indicate the line to jump to. Use (?<TAG_NAME>) to tag a group that will be used to randomly or explicitly assign a style (green bold for example - see Smart Log - Styles).

../../_images/vlogdt-external-smart-log-filters.png

In the Filters Tab you can also set other parameters such as:

  • The maximum number of characters per line (1)

  • The maximum number of consecutive lines (2)

  • Whether links should jump to resources from the current working set (5)

You can browse through predefined filters to see more examples (3).

You can also add a filter pattern for your console title (4). This should contain capturing groups whose contents will be appended to the console title. For example the pattern in the image above: “DVT_CONSOLE_TITLEs+(w+)” will append to the console title when it will match a text like “DVT_CONSOLE_TITLE my_title” in the console output.

Smart Log - Styles

Assuming the filter MyTrace has a pattern Trace (?<AGENT_KIND>[a-zA-Z_0-9]+) (?<INSTANCE>[a-zA-Z_0-9]+).* that contains 2 groups tagged <AGENT_KIND> and <INSTANCE>, DVT will randomly assign a color for each unique combination (AGENT_KIND_match, INSTANCE_match).

You’ll get different colors for:

  • Master M1 (<AGENT_KIND> group matched “Master” and <INSTANCE> matched “M1”)

  • Master M2 (<AGENT_KIND> group matched “Master” and <INSTANCE> matched “M2”)

  • Slave S1 (<AGENT_KIND> group matched “Slave” and <INSTANCE> matched “S1”)

  • Slave S2 (<AGENT_KIND> group matched “Slave” and <INSTANCE> matched “S2”)

You can manually assign colors by editing the .dvt/log_styles.xml file:

You can easily share log styles using Managed Settings.

<?xml version="1.0" encoding="UTF-8"?>

<section name="attributes">

<item key="version" value="1"/>

<list key="log_styles">

<item value="PATTERN_NAME=MyTrace, AGENT_KIND=Master, INSTANCE=M1, COLOR=#FF8000, FONT_STYLE=BOLD, BORDER_STYLE=NONE"/>

<item value="PATTERN_NAME=MyTrace, AGENT_KIND=Master, INSTANCE=M2, COLOR=#008000, FONT_STYLE=BOLD, BORDER_STYLE=NONE"/>

<item value="PATTERN_NAME=MyTrace, AGENT_KIND=Slave, INSTANCE=S1, COLOR=#800080, FONT_STYLE=BOLD, BORDER_STYLE=NONE"/>

<item value="PATTERN_NAME=MyTrace, AGENT_KIND=Slave, INSTANCE=S2, COLOR=#8080FF, FONT_STYLE=BOLD, BORDER_STYLE=NONE"/>

</list>

</section>

For example the first line means “If pattern MyTrace matched and AGENT_KIND is ‘Master’ and INSTANCE is ‘M1’ set color to …”.

You can use regular expressions, for example AGENT_KIND=M*.

You can specify the COLOR, the FONT_STYLE (BOLD or ITALIC), and the BORDER_STYLE (DOT or SOLID or NONE).

Note

If you want to also use the random color palette available for the predefined filters, you should add the following item in the .dvt/log_styles.xml file: