0 purchases
debug logger
debug_logger #
A liteweight utility for dev logging
debug_logger is an open source project — it's one among many other shared libraries that make up the wider ecosystem of software made and open sourced by Savannah Informatics Limited.
A shared library that is responsible for displaying various logging options used for development and debugging
Installation Instructions #
Use this package as a library by depending on it
Run this command:
With Flutter:
$ flutter pub add debug_logger
copied to clipboard
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
debug_logger: ^0.0.23
copied to clipboard
Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Lastly:
Import it like so:
import 'package:debug_logger/debug_logger.dart';
copied to clipboard
How to use debug_logger #
Debug #
Output fields and values to the terminal this way:
DebugLogger.debug(your_value);
copied to clipboard
This will display a white debug output as shown on the screenshot above.
Info #
Output fields and values to the terminal this way:
DebugLogger.info(your_value);
copied to clipboard
This will display a blue debug output as shown on the screenshot above.
Warning #
Output fields and values to the terminal this way:
DebugLogger.info(your_value);
copied to clipboard
This will display an amber debug output as shown on the screenshot above.
Error #
Output fields and values to the terminal this way:
DebugLogger.info(your_value);
copied to clipboard
This will display a red (danger) debug output as shown on the screenshot above.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.