npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

log-glow

v0.1.2

Published

log-glow is a versatile, developer-friendly logging tool designed to enhance the logging experience across various JavaScript environments, including Node.js, web browsers, and React Native. It brings a vibrant and organized approach to console logging, m

Downloads

7

Readme

Log-glow

log-glow is a versatile logging tool designed to enhance the development experience across various JavaScript environments, including Node.js, web browsers, and React Native. It brings clarity and organization to your console logs with color coding and environment-specific functionality.

Features

Developers often struggle with cluttered and hard-to-read console logs, especially when dealing with complex applications. log-glow addresses this issue by:

  • Color-Coding Logs: Making logs more readable and distinguishable.

  • Environment-Specific Logging: Reducing noise in production logs by enabling verbose logging only in development environments.

Problems Solved

During development, it's common to encounter the following challenges:

  • Difficulty in distinguishing between various types of log messages.

  • Console logs becoming cluttered and overwhelming, especially in production environments.

  • Spending excessive time debugging due to unclear log outputs. log-glow tackles these problems by providing a clear, customizable, and environment-aware logging solution.

How to use

Install log-glow using npm:

npm install log-glow

or using yarn

yarn add log-glow

Usage

Import log-glow into your project:

import {cls} from 'log-glow';

Basic Logging

cls('Hello, world!', { label: 'info', color: 'blue' });

Props

  • message: The message you want to log.

  • options: An object containing:

  • label: A string indicating the type of log (e.g., 'error', 'red').

  • color: (Optional) A string specifying the color for the log message.

Color to pass

  • red - Red for error.

  • yellow - Yellow for warning.

  • green - green for success.

  • blue - Blue for info

  • purple - Purple for any custom message.

Example

Log an error message in red:

cls('An error occurred', { label: 'error', color: 'red' });

Log a success message in green without specifying the color explicitly:

cls('Operation successful', { label: 'success' });

🔗 Links

linkedin twitter

Feedback

If you have any feedback, please reach out to us at [email protected]