gitmyhub

signale

JavaScript ★ 9.2k updated 2mo ago

Highly configurable logging library

A Node.js logging library that adds colored icons, labels, and scope tags to terminal output, shipping with 19 built-in log types and support for custom types, timers, and sensitive value filtering.

JavaScriptNode.jsnpmYarnsetup: easycomplexity 2/5

Signale is a logging library for Node.js that focuses on producing clean, readable output in the terminal. When a Node.js application writes log messages, they typically appear as plain text. Signale adds structure, color, icons, and labels to those messages, making it easier to scan what is happening at a glance.

Out of the box, the library ships with 19 different log types covering the most common categories a developer needs: success, error, warning, information, debug, pending operations, and more. Each type has its own visual marker and color. You call them by name in your code, and the corresponding styled line appears in the terminal.

Beyond the default set, you can define your own custom log types. You configure each type with a badge (an icon or symbol), a label, a color, and a log level. This lets you tailor the output to match exactly what your project needs. You can also override the appearance of the built-in types if the defaults do not fit your workflow.

Signale supports scoping, which means you can tag messages with the name of the module or file they come from. This is useful in larger projects where multiple parts of the application are logging at the same time and you need to trace which message originated where.

A few other features the README covers: built-in timers for measuring how long operations take, a mechanism to filter out sensitive values (like API keys or passwords) before they appear in logs, support for writing to multiple output streams at once, an interactive mode where terminal output updates in place rather than scrolling, and project-wide configuration through package.json. TypeScript types are included. The library is installable via npm or Yarn and is MIT-licensed.

Where it fits