createHeader method

  1. @visibleForTesting
String createHeader(
  1. NoticeRecord record
)

Implementation

@visibleForTesting
String createHeader(NoticeRecord record) {
  final buffer = StringBuffer();
  buffer.write(record.level.name);
  buffer.write(" ");
  if (record.breadcrumbs.isNotEmpty) {
    buffer.write(record.breadcrumbs.join('.'));
    buffer.write(" ");
  }
  buffer.write(record.timestamp.toIso8601String().replaceFirst('T', ' '));
  return buffer.toString();
}