trackit 0.1.2 copy "trackit: ^0.1.2" to clipboard
trackit: ^0.1.2 copied to clipboard

Very simple, lightweight and modular logging system. Trackit is a logger that is expandable with additional modules.

example/trackit_example.dart

import 'package:trackit/trackit.dart';

void main() {
  /// Subscription to logger events
  Trackit().listen((event) {
    /// Logger event processing
    /// In the real world, it is more logical to use formatters
    /// and output implemented in other Trackit modules
    /// or their own implementations
    print(event.message?.toString());
  });

  /// Creating a unique logger instance
  final log = Trackit.create('MAIN');

  /// Logger event generation
  log.info('Hello World');
  log.debug('Debug message');
  try {
    throw Exception('Test Error exception message');
  } catch (exception, stackTrace) {
    log.error('catch error exception', exception, stackTrace);
  }
  try {
    throw Exception('Test Fatal exception message');
  } catch (exception, stackTrace) {
    log.fatal('catch fatal exception', exception, stackTrace);
  }
}
1
likes
150
points
189
downloads

Publisher

verified publisherunger1984.pro

Weekly Downloads

Very simple, lightweight and modular logging system. Trackit is a logger that is expandable with additional modules.

Repository (GitHub)
View/report issues

Topics

#cross-platform #logging

Documentation

API reference

Funding

Consider supporting this project:

boosty.to

License

MIT (license)

Dependencies

meta

More

Packages that depend on trackit