From d58ce29e58db058bed03577c93bc339542ec262e Mon Sep 17 00:00:00 2001 From: "susa.keyber" Date: Sun, 1 May 2022 15:21:45 +0900 Subject: [PATCH] #1 update README --- README.md | 71 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index b353cb3..1af3148 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,68 @@ -# roggle +# Roggle -Simple, colorful and easy to expand logger for dart. +Simple, colorful and easy to expand logger for dart.
+Inspired by [logger](https://pub.dev/packages/logger). -## Features +## Getting Started -TODO: List what your package can do. Maybe include images, gifs, or videos. +Just create an instance of `Roggle` and start logging: -## Getting started +```dart +final logger = Roggle(); + +logger.d('Roggle is working!'); +``` + +Instead of a string message, you can also pass other objects like `List`, `Map`, `Set` or `Function`. + +## Output + +![Roggle](https://user-images.githubusercontent.com/13707135/166134270-a2c6316f-eff1-4533-9022-eb4e6cee0697.png) -TODO: List prerequisites and provide or point to information on how to -start using the package. +# Documentation -## Usage +Roggle's API is almost the same as logger. See [logger](https://pub.dev/packages/logger) for basic usage. -TODO: Include short and useful examples for package users. Add longer examples -to `/example` folder. +## Options + +If you use the `SinglePrettyPrinter`, there are more options: ```dart -const like = 'sample'; +final logger = Roggle( + printer: SinglePrettyPrinter( + loggerName: '[APP]', // Print a logger name for each log message + colors: true, // Colorful log messages + printCaller: true, // Print a caller for each log message + printEmojis: true, // Print an emoji for each log message + printLabels: true, // Print a level string for each log message + printTime: true, // Print a timestamp for each log message + stackTraceLevel: Level.error, // The current logging level to display stack trace + stackTraceMethodCount: 10, // Number of stack trace methods to display + ), +); +``` + +## MIT License ``` +MIT License -## Additional information +Copyright (c) 2022 Keyber Inc. -TODO: Tell users more about the package: where to find more information, how to -contribute to the package, how to file issues, what response they can expect -from the package authors, and more. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +```