dog 1.4.0 copy "dog: ^1.4.0" to clipboard
dog: ^1.4.0 copied to clipboard

Simple and pretty log package for Dart, includes Flutter and web.

example/lib/example.dart

import 'dart:io';

import 'package:dog/dog.dart';

void main(List<String> args) {
  // dog = Dog(
  //   handler: Handler(
  //     formatter: SimpleFormatter(),
  //     emitter: ConsoleEmitter(),
  //     // emitter: FileEmitter(file: File('log.txt'), append: false),
  //   ),
  // );
  dog.v('verbose');
  dog.d('debug');
  dog.i('info');
  dog.w('warning');
  dog.e('error');
  dog.i({
    'a': 1,
    'b': {'b1': '2', 'b2': '2'},
    'c': 3
  });
  dog.w([1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 'a']);

  dog.i({'success': true},
      tag: 'HTTP', title: 'Response: https://api.example.com/');

  try {
    throw Exception('This is an exception.');
  } catch (e, st) {
    dog.e(e, stackTrace: st);
  }

  dog.d(() => 'This this a message returned by Function.');
}
11
likes
140
points
273
downloads

Publisher

unverified uploader

Weekly Downloads

Simple and pretty log package for Dart, includes Flutter and web.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

ansicolor, stack_trace, tuple

More

Packages that depend on dog