This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

getErrorLog

Class: slmetric.Engine
Package: slmetric

Get error log

Syntax

metricLog = getErrorLog(metric_engine)

Description

Get a log of errors and warnings that occurred during metric data collection of a specified metric engine object. The log includes errors that occurred during the execution of metric algorithms, model compilation, and metric data validation.

Input Arguments

expand all

Constructed slmetric.Engine object.

Output Arguments

expand all

The metricLog string contains the errors and warnings from metric analysis and is formatted in HTML.

Examples

expand all

This example shows how to create a slmetric.Engine object, set the analysis root, generate metrics, and create and display the error log for the model sldemo_fuelsys.

% Create an slmetric.Engine object
metric_engine = slmetric.Engine();

% Specify model for metric analysis
setAnalysisRoot(metric_engine, 'Root', 'sldemo_fuelsys');

% Collect model metrics for only the analysis root
metricID = 'mathworks.metrics.SimulinkBlockCount';
execute(metric_engine, metricID);

metricLog = getErrorLog(metricEngine);
disp(metricLog);

Introduced in R2017a