ConsoleLogHandler constructor
ConsoleLogHandler({
- LinePrinter? printer,
- List<
BDLevel> supportedLevels = BDLevel.values, - BDLogFormatter logFormatter = const DefaultLogFormatter(),
Create a new instance of the ConsoleLogHandler.
Or reuse a already available instance.
printer
is a function that's called to print a line to the console.
supportedLevels
are the log levels that this handler supports.
logFormatter
is the formatter that defines how log records
should be printed on console.
Implementation
factory ConsoleLogHandler({
LinePrinter? printer,
List<BDLevel> supportedLevels = BDLevel.values,
BDLogFormatter logFormatter = const DefaultLogFormatter(),
}) {
return ConsoleLogHandler.private(
supportedLevels,
logFormatter,
printer ?? Zone.current.print,
);
}