Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vxern/sprint
A tool for printing messages to the web console or to the terminal in a variety of modes.
https://github.com/vxern/sprint
complete console dart documented logger logging print terminal
Last synced: 5 days ago
JSON representation
A tool for printing messages to the web console or to the terminal in a variety of modes.
- Host: GitHub
- URL: https://github.com/vxern/sprint
- Owner: vxern
- License: mit
- Created: 2021-06-18T20:26:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-31T18:24:18.000Z (about 1 year ago)
- Last Synced: 2023-11-01T18:50:24.257Z (about 1 year ago)
- Topics: complete, console, dart, documented, logger, logging, print, terminal
- Language: Dart
- Homepage: https://pub.dev/packages/sprint
- Size: 48.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## The simplest way to print messages in your Dart project
### Usage
If you like your code verbose, you may use long function names:
```dart
final log = Sprint('Module');log.debug('Debug message');
log.success('Success message');
log.info('Info message');
log.warn('Warning message');
log.severe('Severe message');
log.fatal('Fatal message');
```If you prefer to be brief in your writing, use short function names instead:
```dart
final log = Sprint('Module');log.d('Debug message');
log.s('Success message');
log.i('Info message');
log.w('Warning message');
log.sv('Severe message');
log.f('Fatal message');
```It is also possible to call the instance itself as follows:
```dart
final log = Sprint('Module');log('Info message');
```To include timestamps in logs, set `includeTimestamp` to `true`:
```dart
final log = Sprint('Module', includeTimestamp: true);
```The display of messages can be controlled using the `quietMode` field. If set to
`true`, no messages will be printed.```dart
log.quietMode = true;
log('This message will not be posted.');log.quietMode = false;
log('However, this one *will* be.');
```