LCOV - code coverage report

Current view
top level - src/_impl/xplat - _internal_logger.dart
Test
lcov.info
Date
2025-03-26
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines88100.0%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import 'package:logger/web.dart';
2
3class InternalLogger extends Logger {
410 InternalLogger()
510 : super(
610 filter: _LogAllFilter(),
710 printer: _DummyPrinter(),
810 output: _NoLogOutput(),
9 );
10}
11
12class _NoLogOutput extends LogOutput {
1310 @override
14 void output(OutputEvent event) {
15 // Do nothing in this logger (which lives in the worker thread).
16 // The log event will be captured and forwarded to the channelLogger (which
17 // lives in the main thread).
18 }
19}
20
21class _DummyPrinter extends LogPrinter {
2210 @override
23 List<String> log(LogEvent event) =>
24 // Logger will ignore log events that produce an empty array.
25 // Make sure the array is not empty so the log event is notified
26 // through Logger's output callbacks.
27 const [''];
28}
29
30class _LogAllFilter extends LogFilter {
3110 @override
32 bool shouldLog(LogEvent event) =>
33 // Log everything. It's up to the receiving channelLogger to decide
34 // whether the message should be logged or not.
35 true;
36}
Choose Features