colorMappings top-level property Null safety

Map<Level, String Function(String)> colorMappings
final

Maps logging levels to the methods that colour them.

Implementation

final colorMappings = <Level, String Function(String)>{
  Level.debug: (string) => string.gray(),
  Level.success: (string) => string.green(),
  Level.info: (string) => string.cyan(),
  Level.warn: (string) => string.yellow(),
  Level.severe: (string) => string.red(),
  Level.fatal: (string) => string.red().onYellow(),
};