Skip to content

Commit

Permalink
Moving these error logs to logs (#33957)
Browse files Browse the repository at this point in the history
* Removing these errors

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
woody-apple and restyled-commits authored Jul 17, 2024
1 parent 6cde0eb commit df8c9da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/darwin/Framework/CHIP/MTRDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -3667,7 +3667,9 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray<NSDictionary<NSSt
}
}

MTR_LOG("%@ report from reported values %@", self, attributePathsToReport);
if (attributePathsToReport.count > 0) {
MTR_LOG("%@ report from reported values %@", self, attributePathsToReport);
}

return attributesToReport;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ - (void)checkValuesAndResetToDefaultIfNecessary

// Sanity check all the values, and if any is out of range, reset to default values
if ((_reportToPersistenceDelayTime <= 0) || (_reportToPersistenceDelayTimeMax <= 0) || (_reportToPersistenceDelayTimeMax < _reportToPersistenceDelayTime) || (_recentReportTimesMaxCount < 2) || (_timeBetweenReportsTooShortThreshold <= 0) || (_timeBetweenReportsTooShortMinThreshold <= 0) || (_timeBetweenReportsTooShortMinThreshold > _timeBetweenReportsTooShortThreshold) || (_reportToPersistenceDelayMaxMultiplier <= 1) || (_deviceReportingExcessivelyIntervalThreshold <= 0)) {
MTR_LOG_ERROR("%@ storage behavior: MTRDeviceStorageBehaviorConfiguration values out of bounds - resetting to default", self);
MTR_LOG("%@ storage behavior: MTRDeviceStorageBehaviorConfiguration values out of bounds - resetting to default", self);

_reportToPersistenceDelayTime = kReportToPersistenceDelayTimeDefault;
_reportToPersistenceDelayTimeMax = kReportToPersistenceDelayTimeMaxDefault;
Expand Down

0 comments on commit df8c9da

Please sign in to comment.