Skip to content

ueki-tomohiro/rotation_log

Repository files navigation

melos

Features

logger support rotation day or lines.

Usage

import 'package:rotation_log/rotation_log.dart';

final term = RotationLogTerm.term(RotationLogTermEnum.daily);
final logger = RotationLogger(term);

Future main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await logger.init();
  runZonedGuarded(() async {
    runApp(const MyApp());
  }, (error, trace) {
    logger.exception(error, trace);
  });
}

support logger package

import 'package:logger/logger.dart';
import 'package:rotation_log/rotation_log.dart';

final rotationLogger = RotationLogger(RotationLogTerm.day(3));
final logger = Logger(output: RotationLogOutput(rotationLogger));

Future main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await rotationLogger.init();

  FlutterError.onError = (details) {
    logger.e(details.summary.toString(), details.exception, details.stack);
  };

  runApp(const MyApp());
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published