logPerformance method
void
logPerformance(})
override
Log performance metrics.
Implementation
@override
void logPerformance(
String operation,
Duration duration, {
Map<String, dynamic>? context,
}) {
if (options.logLevel == VanturaLogLevel.none ||
VanturaLogLevel.info.index < options.logLevel.index)
return;
final redactedContext = _redact(context);
final contextStr = (redactedContext != null && redactedContext.isNotEmpty)
? ' | Context: $redactedContext'
: '';
_print(
'$_magenta[PERFORMANCE] $operation took ${duration.inMilliseconds}ms$contextStr$_reset',
);
}