file_lumberdash 1.0.0 copy "file_lumberdash: ^1.0.0" to clipboard
file_lumberdash: ^1.0.0 copied to clipboard

Lumberdash package that outputs your logs to the file system.

example/lib/main.dart

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:lumberdash/lumberdash.dart';
import 'package:path_provider/path_provider.dart';
import 'package:file_lumberdash/file_lumberdash.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  Directory appDocDir = await getApplicationDocumentsDirectory();
  String appDocPath = appDocDir.path;
  final currentDate = DateTime.now();
  final fileName =
      '${currentDate.year}-${currentDate.month}-${currentDate.day}-logs';
  putLumberdashToWork(withClients: [
    FileLumberdash(
      filePath: '$appDocPath/$fileName.txt',
    ),
  ]);
  logWarning('Hello Warning');
  logFatal('Hello Fatal!');
  logMessage('Hello Message!');
  logError(Exception('Hello Error'));
}
0
likes
160
points
61
downloads

Publisher

verified publisherbmwtech.dev

Weekly Downloads

Lumberdash package that outputs your logs to the file system.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

lumberdash, meta, synchronized

More

Packages that depend on file_lumberdash