ispectify 0.0.1-dev.1 copy "ispectify: ^0.0.1-dev.1" to clipboard
ispectify: ^0.0.1-dev.1 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
0
points
208
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

License

unknown (license)

Dependencies

ansicolor

More

Packages that depend on ispectify