format method

  1. @override
String format(
  1. NoticeRecord record,
  2. NoticeWriterContext context
)
override

Formats the record into a string.

Implementation

@override
String format(NoticeRecord record, NoticeWriterContext context) {
  final parts = [
    createBody(record),
    createError(record),
    createStackTrace(record),
  ].whereType<String>().toList();
  final borderPen = context.colorSupport
      ? levelToAnsiPenMap.getByEqualLevelOrHigher(record.level)
      : AnsiPen();
  return createBox(createHeader(record), parts, borderPen);
}