leancode_logging 1.2.0 copy "leancode_logging: ^1.2.0" to clipboard
leancode_logging: ^1.2.0 copied to clipboard

discontinuedreplaced by: logging_bugfender

Abstract logging utilities

leancode_logging #

Abstract logging utilities for Dart (do not depend on Flutter).

This library is used as a wrapper around desired logging LeanCode library e.g. leancode_logging_flutter.

Using the package in app #

Define a global variable in you app to access the logger:

final bugfender = Bugfender(config.bugfenderKey, config.debugMode); // from leancode_logging_flutter
logger = bugfender;

This will allow you to use logger throughout your application easily, for example:

try {
//do something
} catch (e, s) {
logger.logException(e, s);
}

To see all available methods take a look at API reference.

Using the package in tests #

This package can be used in tests without dependency on Flutter itself. This way you can have your tests running with just Dart without Flutter.

In order to do that you need to override logger variable in test setup. When using mockito you can provide a simple mock, for example:

// define simple mock
class FakeLogger extends Mock implements Logger {}

// and then use in setup:
logger = FakeLogger();
1
likes
10
pub points
2%
popularity

Publisher

verified publisherleancode.pl

Abstract logging utilities

Homepage

License

unknown (LICENSE)

More

Packages that depend on leancode_logging