Skip to content

Winston@3 console formatter, because logging to the console should be delightful.

License

Notifications You must be signed in to change notification settings

alexilyaev/winston-format-pretty-console

Repository files navigation

Winston@3 pretty console format

Version npm

Winston@3 pretty console formatter.

Why?

  • Because Winston v3 broke fundamental console features that worked fine in v2 (details)
  • Because logging to the console should be delightful 🎉
  • 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.

About

Winston@3 console formatter, because logging to the console should be delightful.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published