simple_logger_overlay 0.1.4
simple_logger_overlay: ^0.1.4 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
#
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 #








π 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