l 2.0.0-dev.rm.max.lenght.feature copy "l: ^2.0.0-dev.rm.max.lenght.feature" to clipboard
l: ^2.0.0-dev.rm.max.lenght.feature copied to clipboard

outdated

Cross-platform html/io Logger library with simple API. Manipulate with native console and store logs in txt files and indexedDB. Support ascii colorize output.

example/main.dart

// ignore_for_file: unnecessary_statements, avoid_print, cascade_invocations
import 'dart:async' show Future;

import 'package:l/l.dart';

void main() => _displayStatuses()
    .whenComplete(_showProgressBar)
    .whenComplete(_displayDetails);

Future<void> _displayStatuses() async {
  l.store = true;
  l.s('shout me');
  l.e('error msg');
  l.w('warning msg');
  l.i('info msg');
  l < 'alt info msg';
  l.d('debug msg');
  l << 'alt debug msg';
}

Future<void> _showProgressBar() =>
    Stream<int>.fromIterable(List<int>.generate(101, (v) => v))
        .asyncMap<int>((v) =>
            Future<int>.delayed(const Duration(milliseconds: 50), () => v))
        .forEach((v) => l.p(
            percent: v,
            header: '{{ HEADER #$v }}',
            footer: '{{ footer #$v }}',
            data: '{{ data $v% }}'))
          ..whenComplete(l.resume);

Future<void> _displayDetails() async {
  l.v('verbose lvl #1');
  l.vv('verbose lvl #2');
  l.vvv('verbose lvl #3');
  l.vvvv('verbose lvl #4');
  l.vvvvv('verbose lvl #5');
  l.vvvvvv('verbose lvl #6');
}
77
likes
0
pub points
89%
popularity

Publisher

verified publisherplugfox.dev

Cross-platform html/io Logger library with simple API. Manipulate with native console and store logs in txt files and indexedDB. Support ascii colorize output.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

meta

More

Packages that depend on l