simple_logger_overlay 0.1.5 copy "simple_logger_overlay: ^0.1.5" to clipboard
simple_logger_overlay: ^0.1.5 copied to clipboard

A simple, Dart 3+ compatible Flutter logging plugin with an in-app draggable overlay, log levels, and Dio support

simple_logger_overlay Pub Version #

A lightweight, Dart 3-compatible Flutter logging package with a draggable in-app log viewer overlay โ€” inspired by let_log, rebuilt for modern apps.
Built with ๐Ÿ’™ by Saumya Macwan.


โœจ Features #

  • ๐Ÿง  Non-blocking: Log I/O runs in a background isolate
  • ๐ŸŒˆ Material 3 overlay, dark/light theme aware
  • ๐Ÿ“„ Pretty-printed JSON views for network logs
  • ๐ŸŒ Dio interceptor for network logging with status coloring
  • ๐Ÿ’ฌ Integrates with BLoC, Riverpod, GetX, and logger
  • ๐Ÿ” Filter, sort, search logs
  • ๐Ÿ“ค Export logs as .json, or copy to clipboard
  • ๐Ÿงพ Detailed log view on card tap
  • ๐Ÿš€ Shake-to-open overlay (debug-only)
  • ๐Ÿž Draggable floating debug button
  • ๐Ÿ”Œ Optional: GoRouterObserver, AppLifecycleObserver
  • ๐Ÿ–ฅ๏ธ Emoji + color-coded console logging (with toggle)
  • ๐Ÿงฐ Simple static API: SimpleLoggerOverlay.log(...)

๐Ÿ“ฑ Screenshots #

Image 1 Image 2 Image 1 Image 2 Image 1 Image 2 Image 2 Image 2

๐Ÿš€ Getting Started #

import 'package:simple_logger_overlay/simple_logger_overlay.dart';

@override
Widget build(BuildContext context) {
  return FloatingActionButton(
    onPressed: () {
      SimpleLoggerOverlay.show(context);
    },
    child: const Icon(Icons.file_present),
  );
}

๐Ÿชต Log from Anywhere #

Log directly with the static API:

SimpleLoggerOverlay.log("Something happened", level: LogLevel.info, tag: 'HomeScreen');

๐Ÿงฉ Integrations #

๐Ÿง  BLoC

import 'package:simple_logger_overlay/core/bloc_logger_observer.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  Bloc.observer = SimpleOverlayBlocObserverLogger();
}

๐ŸŒฑ Riverpod

import 'package:simple_logger_overlay/core/riverpod_logger.dart';

void main() {
  runApp(
    ProviderScope(
      observers: [SimpleOverlayLoggerRiverpodObserver()],
      child: const MyApp(),
    ),
  );
}

โšก GetX

import 'package:simple_logger_overlay/core/getx_logger_patch.dart';

void main() {
  simpleOverlayGetXLogObserver();
}

๐ŸŒ Dio Interceptor

import 'package:dio/dio.dart';
import 'package:simple_logger_overlay/core/network_logger_interceptor.dart';

final dio = Dio()
  ..interceptors.add(NetworkLoggerInterceptor());

๐Ÿงญ GoRouter

MaterialApp.router(
  routerDelegate: GoRouter(
    observers: [SimpleOverlayGoRouterObserver()],
    ...
  ).routerDelegate,
);

๐Ÿ“ฑ App Lifecycle

WidgetsBinding.instance.addObserver(SimpleOverlayAppLifecycleObserver());

๐Ÿž Debug Floating Button #

Stack(
  children: [
    child!,
    const DraggableDebuggerFAB(navigatorKey: rootNavigatorKey),
  ],
);

๐Ÿ’ป Console Logging #

Logs are also printed in your terminal with emojis and color by default.

[2025-06-24T19:15:01.000Z] ๐Ÿ” [DEBUG] [LoginBloc] Event dispatched
[2025-06-24T19:15:02.000Z] ๐Ÿ”ฅ [ERROR] [LoginBloc] Invalid password

Disable if needed:

LogStorageService.enableConsole = false;

๐Ÿ“ฆ Export Logs #

Use the export button in the top-right corner of the overlay to:

  • ๐Ÿ“ค Export logs as .json
  • ๐Ÿ“‹ Copy current log to clipboard

๐Ÿ› ๏ธ License #

MIT ยฉ 2025 Saumya Macwan

2
likes
0
points
5
downloads

Publisher

verified publishersammacwan.in

Weekly Downloads

A simple, Dart 3+ compatible Flutter logging plugin with an in-app draggable overlay, log levels, and Dio support

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter, flutter_bloc, flutter_riverpod, get, go_router, intl, path_provider, shake, share_plus

More

Packages that depend on simple_logger_overlay