ispectify 0.0.1-dev.2 copy "ispectify: ^0.0.1-dev.2" to clipboard
ispectify: ^0.0.1-dev.2 copied to clipboard

Advanced error handler and logger package for flutter and dart. App monitoring, logs history, report sharing, custom logs, and etc.

example/ispectify_example.dart

import 'package:ispectify/ispectify.dart';

Future<void> main() async {
  final iSpectify = ISpectify(
    options: ISpectifyOptions(
      colors: {
        ISpectifyLogType.info.key: AnsiPen()..magenta(),
        CustomLog.logKey: AnsiPen()..green(),
      },
      titles: {
        ISpectifyLogType.info.key: 'i',
        CustomLog.logKey: 'Custom',
      },
    ),
  )
    ..error('The restaurant is closed ❌')
    ..info('Ordering from other restaurant...');

  try {
    throw Exception('Something went wrong');
  } catch (e, st) {
    iSpectify.handle(e, st, 'Exception with');
  }

  iSpectify.logCustom(CustomLog('Something like your own service message'));
}

class CustomLog extends ISpectifyLog {
  CustomLog(super.message);

  static const logKey = 'custom_log_key';

  @override
  String? get key => logKey;
}
0
likes
140
points
188
downloads

Publisher

unverified uploader

Weekly Downloads

Advanced error handler and logger package for flutter and dart. App monitoring, logs history, report sharing, custom logs, and etc.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

ansicolor

More

Packages that depend on ispectify