logger_master 1.0.2
logger_master: ^1.0.2 copied to clipboard
A lightweight Flutter logging utility with colorful output, tags, and clickable file paths for easier debugging in IDEs.
🚀 Features
✅ Simple API – just call object.info(), object.error(), etc.
✅ Clickable logs – one click takes you to the exact file & line in Android Studio / IntelliJ.
✅ Colored logs (info, warning, error, debug.) for better readability.
✅ Works with any Dart object.
✅ Zero external dependencies.
1: Specify the object type – for example [String].
2: Provide the object value – e.g. "Hello World".
3: Log the exact file and line number where the object is used.
4: Log only the line number of the object’s location.
📥 Installation
Add to your pubspec.yaml:
dependencies:
logger_master: ^1.0.2
Then run:
flutter pub get
🛠️ Usage
import 'package:logger_master/logger_master.dart';
void main() {
ExampleModel exampleModel = ExampleModel(id: 1, name: "Example");
// Log info
"Hello World".logInfo();
// Log with a custom tag
exampleModel.logWarning();
exampleModel.name.logError();
// Log an error
123.logDebug();
}
🎨 Colored Output Method Example Usage Output Color
logInfo() "Hello".logInfo() 🟦 Blue
logDebug() "Debug".logDebug() 🟩 Green
logWarning() "Careful".logWarning() 🟨 Yellow
logError() "Oops".logError() 🟥 Red
🖱️ Clickable Logs
When you run your app in Android Studio or IntelliJ, logs printed by logger look like this:
[String] Hello World [file://package:example/main.dart:10]
👉 Clicking (main.dart:10) takes you directly to that file and line in your code.
This makes debugging faster and smoother – no more searching for where a log was printed!
⚙️ Customization
You can enable/disable colors:
object.info(colored: false);
Or add tags:
object.debug('NETWORK');
📌 Roadmap
JSON pretty-printing
File logging support
Flutter-only extension (snackbar + toast logs)
❤️ Contributing
Contributions, issues, and feature requests are welcome! Feel free to check issues page .
📄 License
This project is licensed under the MIT License.