Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scientifichackers/super_logging
The usual dart logging module with superpowers!
https://github.com/scientifichackers/super_logging
Last synced: 3 days ago
JSON representation
The usual dart logging module with superpowers!
- Host: GitHub
- URL: https://github.com/scientifichackers/super_logging
- Owner: scientifichackers
- License: mit
- Created: 2019-04-23T20:22:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-17T18:51:02.000Z (about 3 years ago)
- Last Synced: 2023-08-20T23:19:07.996Z (about 1 year ago)
- Language: Dart
- Size: 45.9 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Super Logging
[![Sponsor](https://img.shields.io/badge/Sponsor-jaaga_labs-red.svg?style=for-the-badge)](https://www.jaaga.in/labs)
[![pub package](https://img.shields.io/pub/v/super_logging.svg?style=for-the-badge)](https://pub.dartlang.org/packages/super_logging)
This package lets you easily log to:
- stdout
- disk
- sentry.io```dart
import 'package:super_logging/super_logging.dart';
import 'package:logging/logging.dart';final logger = Logger("main");
main() async {
// just call once, and let it handle the rest!
await SuperLogging.main();
logger.info("hello!");
}
```(Above example will log to stdout and disk.)
## Logging to sentry.io
Just specify your sentry DSN.
```dart
SuperLogging.main(LogConfig(
sentryDsn: 'https://[email protected]/yyyy',
));
```## Log uncaught errors
Just provide the contents of your `main()` function to super logging.
```dart
void main() {
SuperLogging.main(LogConfig(
body: _main,
));
}void _main() {
runApp(MyApp());
}
```[Read the docs](https://pub.dev/documentation/super_logging/latest/super_logging/super_logging-library.html) to know about more customization options.