header static method

void header(
  1. String message, {
  2. String tag = 'Reactiv',
  3. String char = '═',
  4. int length = 80,
})

Log a header with borders

Implementation

static void header(
  String message, {
  String tag = 'Reactiv',
  String char = '═',
  int length = 80,
}) {
  if (!config.enabled) return;
  final border = char * length;
  _log(LogLevel.info, border, tag: tag);
  _log(
    LogLevel.info,
    message.toUpperCase().padLeft((length + message.length) ~/ 2),
    tag: tag,
  );
  _log(LogLevel.info, border, tag: tag);
}