fimber 0.7.0 copy "fimber: ^0.7.0" to clipboard
fimber: ^0.7.0 copied to clipboard

Extensible logging for Flutter - based on Timber on Android, using similar (as far as Dart lang allows) method API with same concepts for tree and planting logging tree.

example/example.dart

import 'package:fimber/fimber.dart';

void main() {
  // plant a tree - DebugTree()
  Fimber.plantTree(DebugTree());

  Fimber.d("Test message", ex: Exception("test error"));
  const parameter = 100.0;
  Fimber.w("Test message with parameter: $parameter");

  final logger = FimberLog("MY_TAG");
  logger.d("Test message", ex: Exception("test error"));
  logger.w("Test message with parameter: $parameter");

  try {
    throw Exception("Exception thrown");
    // ignore: avoid_catches_without_on_clauses
  } catch (e, stacktrace) {
    // providing stacktrace will better show where issue was thrown
    Fimber.i("Error caught.", ex: e, stacktrace: stacktrace);
  }
  // save time without auto tag generation on each call in call block.
  Fimber.withTag("TEST BLOCK", (log) {
    log.d("Started block");
    for (var i = 0; i >= 1; i++) {
      log.d("value: $i");
    }
    log.i("End of block");
  });
}
73
likes
140
pub points
95%
popularity

Publisher

unverified uploader

Extensible logging for Flutter - based on Timber on Android, using similar (as far as Dart lang allows) method API with same concepts for tree and planting logging tree.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

More

Packages that depend on fimber