logx 0.0.3 copy "logx: ^0.0.3" to clipboard
logx: ^0.0.3 copied to clipboard

outdated

Simple and concise logs for Dart/Flutter built on top of developer package.

LogX: Simple and concise logs for Flutter #

Pub Version

LogX adds extends method log from dart:developer package to add useful features, namely mixins and static methods.

Screenshot

Mixin #

You can use LogMixin to easily include log methods into any class. With mixin name of the context is automatically set to runtime type of current class.

class A with LogMixin {
    void hello() {
        log.d('Hello world!');
        log('This instance is callable!');
    }
}

You can either use methods: log.d('Hello') or call the class instance: log('Hello'). Both results to equal output.

Static methods #

If you cannot use LogMixin (for example in top-level functions) you can use static methods from Log class. Remeber that you need to provide name by yourself, otherwise default name is used.

void main() {
    Log.d('Hello', name: 'Main');
}

Important: Do not import dart:developer together with this package. They both use log keyword and it might conflict.

3
likes
0
pub points
30%
popularity

Publisher

verified publishervojtech.net

Simple and concise logs for Dart/Flutter built on top of developer package.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on logx