an_logger 1.0.0 copy "an_logger: ^1.0.0" to clipboard
an_logger: ^1.0.0 copied to clipboard

A logging tool that can be customized to output to any location.

A logging tool that can be customized to output to any location.

Usage #

void main() {
  Log.addPrinter(MyPrinter());

  Log.v(tag: 'AnLog', msg: 'hello word');
  Log.d(tag: 'AnLog', msg: 'hello word', err: 'who is err ');

  Log.i(tag: 'AnLog', msg: 'hello word');
  Log.w(tag: 'AnLog', msg: 'hello word  wwwwwww');

  Log.e(
      tag: 'AnLog',
      msg: 'hello word',
      err: 'err?',
      stackTrace: StackTrace.current);
}

class MyPrinter extends LoggerPrinter {
  @override
  void printEvent(LogLevel level, String tag, LogEvent event) {
    ///Customize your output content, feel free to express yourself in any way.
  }
}

See example for detailed test case.

Additional information #

If you encounter issues, here are some tips for debug, if nothing helps report to issue tracker on GitHub:

0
likes
125
pub points
0%
popularity

Publisher

verified publisheraymtools.com

A logging tool that can be customized to output to any location.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on an_logger