An extensible logger for applications, packages and plugins.
Logging and Debugging Tools
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';
-
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}