Cross-platform html/io [L]ogger with simple API.
No need to create an logger object. Just import and use. Simple and w/o boilerplate.
Work with native console and can store logs in txt files (io) and indexedDB (web).
You can change verbose level and resume/pause log queue, also you can clear console.

Core API

Key features
sA shout is always displayed
vRegular message with verbose level 1
eError message with verbose level 1
vvRegular message with verbose level 2
wWarning message with verbose level 2
vvvRegular message with verbose level 3
i or <Inform message with verbose level 3
vvvvRegular message with verbose level 4
d or <<Debug message with verbose level 4
vvvvvRegular message with verbose level 5
vvvvvvRegular message with verbose level 6
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';
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');
Setup and management
lvlLimiting output level (default 3 in release, 6 in debug)
storeSet to true to save logs (default is false)
wideDisplay wide prefix entry (default is false)
pausePause for message queue
resumeContinued after a pause
clearConsole cleaning (if a terminal is connected)
l.lvl = 4; = true;
l.wide = false;

Only works in io environments with a connected terminal.
If it is impossible to output - ignored.
Pauses the output of the remaining logs, do not forget to use the "resume".

pDisplays a progress bar
resumeContinued after progress finished
Stream<int>.fromIterable(List<int>.generate(101, (int v) => v))
    .asyncMap<int>((int v) =>
        Future<int>.delayed(const Duration(milliseconds: 25), () => v))
    .forEach((int v) => l.p(
        percent: v,
        header: '{{ HEADER $v }}',
        data: '{{ data $v% }}',
        footer: '{{ footer $v }}',))
      ..whenComplete(l.resume); // Must use 'resume'


                {{ HEADER 21 }}
[========>       {{ data 21% }}                ]
                                {{ footer 21 }}
Integration capabilities
streamBroadcast stream instantly receiving logs.
mwMiddleware queue with functions
// Broadcast stream instantly receiving logs. log) => print('* ${log.level}'));

// Middleware queue, functions are called 
// at the time of log processing
// and block further until complete execution<Future<void> Function(LogMessage)>[
  (LogMessage log) async {print('# ${}');},
  (LogMessage log) async {print('# ${log.message}');},


  • When there is no direct access to the terminal, it works through print.
  • When it is not possible to get write access to the working directory, the logs are not saved.
  • Do not log sensitive information.




logger, log, logs, logging, logging-library, cross-platform, io, html


Logger library [...]