logging_bugfender 1.0.0
logging_bugfender: ^1.0.0 copied to clipboard

Flutter Android iOS

A library helping integrate Bugfender with the logging package.

logging_bugfender #

logging_bugfender pub.dev badge

A library helping integrate Bugfender with the logging package.

Usage #

Setup

final loggingListener = LoggingBugfenderListener('my-very-secret-app-key');

// You probably want it to be INFO on production
Logger.root.level = Level.ALL;
// Listen on root logger
loggingListener.listen(Logger.root);

const logUsernameKey = 'username';

// After the user signs in
loggingListener.setCustomData(logUsernameKey, '<some username>');

// After the user signs out
loggingListener.removeCustomData(logUsernameKey);

Using the logger

class FooBarCubit {
    final _log = Logger('foo_bar_cubit');

    // (...)

    void doSomething() {
        try {
            // (...)
            _log.info('Successfuly did something');
        } catch (e) {
            _log.severe('Failed doing something: $e');
        }
    }
}
1
likes
70
pub points
26%
popularity

Publisher

leancode.pl

A library helping integrate Bugfender with the logging package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache 2.0 (LICENSE)

Dependencies

flutter_bugfender, logging

More

Packages that depend on logging_bugfender