recordDebugLog method

  1. @visibleForTesting
void recordDebugLog(
  1. String? message, {
  2. String? source,
  3. Map<String, String> details = const <String, String>{},
})

Implementation

@visibleForTesting
void recordDebugLog(
  String? message, {
  String? source,
  Map<String, String> details = const <String, String>{},
}) {
  if (message == null || message.isEmpty) {
    return;
  }
  _record(
    CockpitRuntimeEvent(
      eventId: _nextEventId(),
      kind: CockpitRuntimeEventKind.debugLog,
      severity: CockpitRuntimeEventSeverity.info,
      message: _truncate(message, maxMessageLength),
      recordedAt: DateTime.now().toUtc(),
      routeName: _routeNameProvider(),
      source: source ?? 'debugPrint',
      details: _boundedDetails(details),
    ),
  );
}