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.


Class: slmetric.Engine
Package: slmetric

Get error log


metricLog = getErrorLog(metric_engine)


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.


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);

Introduced in R2017a