Main Content


Class: slmetric.Engine
Package: slmetric

Get error log


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(metric_engine);
Introduced in R2017a