npm install log-symbols

Colored symbols for various log levels. Example: `✔︎ Success`

About log-symbols

In the dynamic world of software development, clear and concise logging is pivotal for debugging and monitoring applications. The npm package "log-symbols" enhances this aspect by providing colored symbols for different log levels, making it significantly easier for developers to scan through logs and quickly identify the status of various operations. With its intuitive icons like `✔︎ Success`, `✖ Failure`, and `⚠ Warning`, "log-symbols" brings a visual dimension to logging, which helps in faster comprehension compared to traditional text-only logs. This feature is particularly beneficial in environments where quick decision-making is essential, such as in production or during a live incident response.

To get started with "log-symbols" in your Node.js projects, the installation process is straightforward. Simply execute the command `npm install log-symbols` in your project directory. This command downloads and integrates the package from the npm registry into your project, making the colorful log symbols immediately available for use. It's compatible with various logging tools and can be seamlessly incorporated into existing Node.js applications to enhance log readability and maintainability. The package also includes fallbacks for Windows CMD, ensuring that it functions correctly even in environments with limited character set support, such as the one described in [Code page 437](https://en.wikipedia.org/wiki/Code_page_437).

The practical benefits of using "log-symbols" extend beyond mere aesthetic enhancement. By employing visually distinct symbols for log levels, developers can reduce the time spent on parsing and understanding logs, leading to quicker troubleshooting and debugging. This efficiency is crucial in maintaining high uptime and ensuring that applications run smoothly. In addition, "log-symbols" is lightweight and does not add significant overhead to the applications, making it an excellent choice for developers looking to improve their logging practices without compromising on performance. Whether you're managing a small project or a large-scale enterprise application, "log-symbols" can significantly streamline your logging process.

More from sindresorhus

sindresorhus npm packages

Find the best node modules for your project.

Search npm

path-key

Get the PATH environment variable key...

Read more
,

slash

Convert Windows backslash paths to slash...

Read more
,

is-wsl

Check if the process is running inside Windows Subsystem for Linux (Bash on...

Read more
,

log-symbols

Colored symbols for various log levels...

Read more
,

default-browser-id

Get the bundle identifier of the default browser (macOS). Example: com.apple...

Read more
,

run-applescript

Run AppleScript and get the...

Read more
,

default-browser

Get the default...

Read more
,

bundle-name

Get bundle name from a bundle identifier (macOS): `com.apple...

Read more
,

os-name

Get the name of the current operating system...

Read more
,

windows-release

Get the name of a Windows version from the release number: `5.1...

Read more
,

macos-release

Get the name and version of a macOS release from the Darwin...

Read more

Dependencies

Core dependencies of this npm package and its dev dependencies.

chalk, is-unicode-supported, ava, strip-ansi, tsd, xo

Documentation

A README file for the log-symbols code repository. View Code

log-symbols

Colored symbols for various log levels

Includes fallbacks for Windows CMD which only supports a limited character set.

Install

npm install log-symbols

Usage

import logSymbols from 'log-symbols';

console.log(logSymbols.success, 'Finished successfully!');
// Terminals with Unicode support:     ✔ Finished successfully!
// Terminals without Unicode support:  √ Finished successfully!

API

logSymbols

info

success

warning

error

Related