Main Content

getErrorLog

Class: slmetric.Engine
Namespace: slmetric

(To be removed) Get error log

The Metrics Dashboard user interface, metricdashboard function, slmetric package API, and corresponding customizations will be removed in a future release. For more information, see Migrating from Metrics Dashboard to Model Maintainability Dashboard.

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.

% Open the example model
openExample('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);
disp(metricLog);

Version History

Introduced in R2017a

collapse all

R2022a: Metrics Dashboard will be removed

The Metrics Dashboard user interface, metricdashboard function, slmetric package API, and corresponding customizations will be removed in a future release. For more information, see Migrating from Metrics Dashboard to Model Maintainability Dashboard.