Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baronsindo/pretty_logger
A flutter package that developers have pretty logs instead just printing everything like a newbie
https://github.com/baronsindo/pretty_logger
dart dart-lang dart-library dart-package flutter flutter-package flutter-packages flutter-plugin
Last synced: 3 months ago
JSON representation
A flutter package that developers have pretty logs instead just printing everything like a newbie
- Host: GitHub
- URL: https://github.com/baronsindo/pretty_logger
- Owner: Baronsindo
- License: mit
- Created: 2021-11-19T19:03:44.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-08T09:10:13.000Z (about 1 year ago)
- Last Synced: 2024-10-12T08:42:02.496Z (3 months ago)
- Topics: dart, dart-lang, dart-library, dart-package, flutter, flutter-package, flutter-packages, flutter-plugin
- Language: Dart
- Homepage:
- Size: 101 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
A flutter package that developers have pretty logs instead just printing everything like a newbie.
## Features
Makes it easy to log to console without using print in a colorful way, with multiple colors, and it works only in debug mode, makeing it perfect for pros.
## Getting started
### Installing
Add the following to your pubspec.yaml file:```yaml
dependencies:
pretty_logger: any
```Import the package.
```dart
import 'package:pretty_logger/pretty_logger.dart';
```## Usage
```dart
void main() {
PLog.info('Hello buddy');
PLog.success('Welcome');
PLog.warning('I am a bad man. Be careful');
PLog.error('Ops. We ran into some trouble');PLog.black('black');
PLog.red('red');
PLog.white('white');
PLog.cyan('cyan');
PLog.green('green');
PLog.yellow('yellow');runApp(const MyApp());
}
```## Supported functions
Main function
| Function usage | Output Color |
|--|--|
|`PLog.info('Hello buddy');`|Blue|
|`PLog.success('Welcome');`|Green|
|`PLog.warning('Be careful');`|Yellow|
|`PLog.error('Ops. trouble')`|Red|Additional colors
| Function usage | Output Color |
|--|--|
|`PLog.black('black');`|Black|
|`PLog.red('red');`|Red|
|`PLog.white('white');`|White|
|`PLog.cyan('cyan');`|Cyan|
|`PLog.green('green');`|Green|
|`PLog.yellow('yellow');`|Yellow|
|`PLog.blue('Blue');`|Blue|