logify 1.0.1 copy "logify: ^1.0.1" to clipboard
logify: ^1.0.1 copied to clipboard

Just another library for logging

codecov pub package package publisher

Just another library for logging.

A little bit based on Timber library.

Unfortunately, colors does not work for iPhone devices, so it is disabled only for iOS.

Features #

  • show logs friendly using tags with call location, colors and emoji;
  • open to implement your custom log output;
  • written on top of logging library.

Getting started #

Add dependency to project:

dart pub add logify

Usage #

// Import the package
import 'package:logify/logify.dart';

void main() {
  // In the main file or entrypoint add a recorder just once
  Log.listen(ConsoleLogRecorder());

  // Now, you can start using
  Log.i('info message');
}

You can also integrate with logging library:

import 'package:logify/logify.dart';
import 'package:logging/logging.dart';

void main() {
  // Change the logging level
  Logger.root.level = Level.ALL; // defaults to Level.INFO
  // Add a recorder
  Logger.root.onRecord.listen(DebugLogRecorder());

  // Now, you can start using
  Log.i('info message');
}

All other packages that use logging will also be handled by DebugLogRecorder.

For more details, see the example project and the logging library documentation.

LogRecorder #

ConsoleLogRecorder

Log.listen(ConsoleLogRecorder());

Output:

ConsoleLogRecorder output preview

DebugLogRecorder

Log.listen(DebugLogRecorder());

Output:

DebugLogRecorder output preview
2
likes
140
points
50
downloads

Publisher

verified publisherpedrox.dev

Weekly Downloads

Just another library for logging

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

logging, meta, stack_trace

More

Packages that depend on logify