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

simple-loger

v1.0.1

Published

Simple-Loger is a straightforward logging utility for Node.js that simplifies application debugging and monitoring by leveraging the console API.

Downloads

3

Readme

Simple-Loger

Simple-Loger is a feature-packed, yet straightforward logging utility built for Node.js applications. It enhances the debugging and monitoring process by effectively using the console API, while maintaining an uncomplicated interface that makes its integration into any project seamless.

Main Features:

  • Versatile Logging Methods: Simple-Loger comes equipped with various logging methods: log, info, verbose, and error. These can be used to categorize log entries according to their severity or importance, assisting in distinguishing routine logs, detailed debugging data, and crucial error messages.

  • Context-Based Logging: A unique name can be given while creating a Logger instance, which will then appear in all the corresponding log entries. This aids in providing clear context to your logs and helps in pinpointing the source of the log.

  • Easy Integration: The API of Simple-Loger is designed to be intuitive and uncomplicated, allowing for smooth integration into your Node.js project.

Usage:

First, install Simple-Loger using npm:

npm install simple-loger

Then, in your JavaScript file, import the Logger class from Simple-Loger:

const Logger = require('simple-loger');

Next, create a new Logger instance:

const myLogger = new Logger('AppLogger');

You can now destructure the logging methods from your logger instance:

const { log, info, verbose, error } = myLogger;

Now, you can emit log entries with your logger:

log('Standard log message');
info('Informative log message');
verbose('Verbose log message for detailed debugging');
error('Error log message for tracking critical issues');

Each log message will include the unique Logger name ('AppLogger' in this case) to ease tracking.