logster 0.1.0 logster: ^0.1.0 copied to clipboard
An extensible logger for applications, packages and plugins.
Logster for Dart/Flutter #
An extensible logger for applications, packages and plugins.
Features #
Logging and Debugging Tools
Getting started #
To add the package, logster
, in a project:
-
Depend on it
-
Add
logster
underdependencies
in thepubspec.yaml
filedependencies: logster: any
-
Or run this command
dart pub add logster
-
-
Install it
-
From the terminal: Run
dart pub get
-
-
Import it
-
Add a corresponding
import
statement in the source codeimport 'package:logster/logster.dart';
-
Usage #
To use the package, add the .logs
extension to any variable, and it will print a log to the console along with its runtime type.
var a = 10;
a.logs; // [int] 10
var b = 2.0;
b.logs; // [double] 2.0
var c = 'x';
c.logs; // [String] x
var d = true;
d.logs; // [bool] true
var e = [a, b];
e.logs; // [List<num>] [10, 2.0]
var f = {c, d};
f.logs; // [CompactImmutableLinkedHashSet<Object>] {x, true}
var g = {a: b, c: d};
g.logs; // [InternalImmutableLinkedHashMap<Object, Object>] {10: 2.0, x: true}