A simple and powerful debugging logger for Dart applications. This package allows developers to log messages with customizable colors, icons, and context information, making debugging easier and more organized.
- 📝 Customizable log messages with tags, colors, and icons.
- 🎨 ANSI color codes for terminal output.
- 🛑 Error and stack trace logging.
- 🔍 Source file location tracking (optional).
- 🚀 Lightweight and easy to use.
Add the following dependency to your pubspec.yaml
:
dependencies:
colorful_log_plus: ^1.0.8
Then, run:
flutter pub get
import 'package:colorful_log_plus/colorful_log_plus.dart';
debugLog(message: "This is a simple log message");
debugLog(tag: 'Auth', message: "User logged in successfully");
debugLog(
message: "This is a warning message",
color: LogColor.yellow,
);
debugLog(
iconType: LogIconType.error,
message: "Failed to fetch data",
);
try {
throw Exception("Something went wrong");
} catch (e, stack) {
debugLog(
message: "An error occurred",
iconType: LogIconType.error,
color: LogColor.red,
error: e,
stackTrace: stack,
);
}
debugLog(
message: "Debugging in progress...",
showLogAddress: true,
);
Log Type | Icon |
---|---|
Info | ℹ️ |
Warning | |
Error | ❌ |
Debug | 🐛 |
Name | Example |
---|---|
Reset | 🔲 Reset |
Red | 🟥 Red |
Green | 🟩 Green |
Yellow | 🟨 Yellow |
Blue | 🟦 Blue |
Magenta | 🟪 Magenta |
Cyan | 🟦 Cyan |
Feel free to open issues or submit pull requests to improve this package!
This package is available under the MIT License.