PrefixPrinter constructor
PrefixPrinter(
- LogPrinter _realPrinter, {
- dynamic debug,
- dynamic verbose,
- dynamic wtf,
- dynamic info,
- dynamic warning,
- dynamic error,
Implementation
PrefixPrinter(this._realPrinter,
{debug, verbose, wtf, info, warning, error}) {
_prefixMap = {
Level.debug: debug ?? 'DEBUG',
Level.verbose: verbose ?? 'VERBOSE',
Level.wtf: wtf ?? 'WTF',
Level.info: info ?? 'INFO',
Level.warning: warning ?? 'WARNING',
Level.error: error ?? 'ERROR',
Level.success: 'SUCCESS',
};
var len = _longestPrefixLength();
_prefixMap.forEach((k, v) => _prefixMap[k] = '${v.padLeft(len)} ');
}