Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexilyaev/winston-format-pretty-console
Winston@3 console formatter, because logging to the console should be delightful.
https://github.com/alexilyaev/winston-format-pretty-console
Last synced: 2 months ago
JSON representation
Winston@3 console formatter, because logging to the console should be delightful.
- Host: GitHub
- URL: https://github.com/alexilyaev/winston-format-pretty-console
- Owner: alexilyaev
- License: mit
- Created: 2019-09-26T17:30:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-10T18:26:30.000Z (over 3 years ago)
- Last Synced: 2024-10-04T17:34:37.146Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.24 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Winston@3 pretty console format
[![Version npm](https://img.shields.io/npm/v/winston-format-pretty-console.svg?style=flat-square)](https://www.npmjs.com/package/winston-format-pretty-console)
Winston@3 pretty **console** formatter.
## Why?
- Because Winston v3 broke fundamental console features that worked fine in v2 ([details](https://github.com/winstonjs/winston/issues/1427#issuecomment-535297716))
- Because logging to the console should be delightful 🎉## Why not [winston-console-format](https://github.com/duccio/winston-console-format)?
- Looks really nice, but has different design goals
- Requires `message` to be a `string` (as opposed to anything we want)
- Doesn't support some of features mentioned below## Features
- Supports any number of arguments, of any type, which will be pretty printed
to the console (`message` argument can be **anything!**)
- Supports colorized string values just fine (e.g. using `chalk`)
- Formats literal values like `number`, `null`, `undefined`, `function`, etc.
- Handles Error objects. The error be any argument
- Supports formatting configuration, per logger and even per single log## Design Decisions
- Should work as expected, basically like `console.log`
- No fancy colors, should be clean by default
- Provides easy Copy/Paste experience of multi-line objects, etc.