https://github.com/andresaraujo/plank
https://github.com/andresaraujo/plank
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/andresaraujo/plank
- Owner: andresaraujo
- License: bsd-3-clause
- Created: 2015-04-07T04:02:36.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-08T18:25:34.000Z (about 10 years ago)
- Last Synced: 2025-01-18T22:58:35.473Z (3 months ago)
- Language: Dart
- Size: 156 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# plank
A simple and extensible logger
You can add new loggers extending `PlankLogger` or `TaggedLogger` and installing
them using `Plank.install`.## Usage
```dart
import 'package:plank/plank.dart';
import 'package:logging/logging.dart' show Level;void main() {
//Optional, defaults to Level.ALL
Plank.setLevel(Level.ALL);//Install the loggers you want to use, handy for dev-prod environments
Plank.install(new SimpleLogger());
Plank.install(new PrettyLogger(showTag: true, colorize: false));//Optional tags the next logs calls
//Plank.tag("MY_TAG");Plank.i("This is an info message");
Plank.w("This is a warning message");
Plank.d("This is a debug message");
Plank.v("This is a verbose message");
Plank.c("This is a config message");
try {
throw new StateError("Somethin' wrong?");
} catch (error, stackTrace) {
Plank.e("This is an error message", error, stackTrace);
}Plank.wtf("This is a terrible failure message");
}```
## Features and bugs
Please file feature requests and bugs at the [issue tracker][tracker].
[tracker]: https://github.com/andresaraujo/plank/issues