flutter_log_handler 0.0.3 copy "flutter_log_handler: ^0.0.3" to clipboard
flutter_log_handler: ^0.0.3 copied to clipboard

Enterprise-grade logging solution for Flutter applications. Provides console logging, file persistence, crash capturing, Dio API interception, retention control, and a built-in professional log viewer UI.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_log_handler/flutter_log_handler.dart';

import 'home_screen.dart';

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

  // Initialize Logger
  LogService.init(
    const LogConfig(
      maxLogs: 1000,
      retentionDays: 7,
      enableConsoleLog: true,
      enableFileLog: true,
      fileName: "example_logs.txt",
      directoryName: "logs",
      sensitiveKeys: ["password", "token"],
    ),
  );

  await LogService.to.getLogs();

  // Enable crash capturing
  CrashWrapper.initialize(
    logService: LogService.to,
  );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Logger Example",
      home: const HomeScreen(),
    );
  }
}
1
likes
0
points
508
downloads

Publisher

unverified uploader

Weekly Downloads

Enterprise-grade logging solution for Flutter applications. Provides console logging, file persistence, crash capturing, Dio API interception, retention control, and a built-in professional log viewer UI.

Repository (GitHub)
View/report issues

Topics

#logging #debugging #monitoring #crash-reporting

License

unknown (license)

Dependencies

dio, flutter, get, path_provider, share_plus

More

Packages that depend on flutter_log_handler