Logger constructor
Logger({
- LogFilter? filter,
- LogPrinter? printer,
- LogOutput? output,
- Level? level,
Create a new instance of Logger.
You can provide a custom printer
, filter
and output
. Otherwise the
defaults: PrettyPrinter, DevelopmentFilter and ConsoleOutput will be
used.
Implementation
Logger({
LogFilter? filter,
LogPrinter? printer,
LogOutput? output,
Level? level,
}) : _filter = filter ?? defaultFilter(),
_printer = printer ?? defaultPrinter(),
_output = output ?? defaultOutput() {
var filterInit = _filter.init();
if (level != null) {
_filter.level = level;
}
var printerInit = _printer.init();
var outputInit = _output.init();
_initialization = Future.wait([filterInit, printerInit, outputInit]);
}