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

silly-logger

v1.3.1

Published

a logger library to make your console fancy

Downloads

43

Readme

Makes your Console look pretty!


Silly-logger is a small project of mine. It's useful to make your console look pretty with a great variety and customizability of logging functions. I'm actively working on the pack so expect to update the package more often in the starting time, tho major features are already in it, some minor ones will be added frequently.

Table of Contents

Install

$ npm install silly-logger

Highlights

  • Customizeable
  • Simple to use
  • Actively Maintained

Usage - Logging Simple Stuff

const logger = require('silly-logger');
// or
import * as logger from 'silly-logger';

// Logger presets
logger.info("Nice Information here");
logger.success("I'm up and running!");
logger.error("Oh no Some error happend here");
logger.crash("Fabulous Crashes (hopefully not)");
logger.warn("Warning! Something didn't work...");
logger.debug("I like Llamas");
logger.startup("Program starting");
logger.deploy("Deployed Command");

Custom Logger Message (Hex Code)

const logger = require('silly-logger');
//or
import * as logger from 'silly-logger';

// logger.custom('PREFIX', 'COLOR', 'TEXTCOLOR', "TEXT")

// Custom Logger Messages with hex code
logger.custom('WONDERFUL', '#ffffff', '#F5A9F2',"Some Message here");
logger.custom('LOL', '#F5A9F2', '#618FB1',"That's so funny");
logger.custom('DARLING', '#618FB1', '#ffffff',"A wunderful DC-Bot for everyone");

Custom Logger Message (Colors)

const logger = require('silly-logger');
//or
import * as logger from 'silly-logger';

// logger.custom('PREFIX', 'COLOR', 'TEXTCOLOR', "TEXT")

// Custom Logger Messages with color
logger.custom('red', 'red', 'red', "red");
logger.custom('orange', 'orange', 'orange',"orange");
logger.custom('gold', 'gold', 'gold', "gold");
logger.custom('yellow', 'yellow', 'yellow', "yellow");
logger.custom('green', 'green', 'green', "green");
logger.custom('dark_green', 'dark_green', 'dark_green', "dark_green");
logger.custom('teal', 'teal', 'teal', "teal");
logger.custom('cyan', 'cyan', 'cyan', "cyan");
logger.custom('light_blue', 'light_blue', 'light_blue', "light_blue");
logger.custom('blue', 'blue', 'blue', "blue");
logger.custom('dark_blue', 'dark_blue', 'dark_blue', "dark_blue");
logger.custom('blurple', 'blurple', 'blurple', "blurple");
logger.custom('purple', 'purple', 'purple', "purple");
logger.custom('fuchsia', 'fuchsia', 'fuchsia', "fuchsia");
logger.custom('magenta', 'magenta', 'magenta', "magenta");
logger.custom('dark_magenta', 'dark_magenta', 'dark_magenta', "dark_magenta");

timeFormat

const logger = require('silly-logger');
//or
import * as logger from 'silly-logger';

// logger.timeFormat('STRING');

//  Change the Format of the Date globally (https://momentjs.com/)
logger.timeFormat('DD-MM-YYYY');
logger.info('Testing DD-MM-YYYY');

logger.timeFormat('h-mm-ss a');
logger.info('Testing h-mm-ss a');

logger.timeFormat("MMM Do YY - h:mm:ss a");
logger.info('Testing MMM Do YY - h:mm:ss a');

Log to files

Create a folder for your logs. Enable the function and set the path, BEFORE you use the logger!

const logger = require('silly-logger');
//or
import * as logger from 'silly-logger';

// logger.enableLogFiles(true/false);
logger.enableLogFiles(true);

// logger.logFolderPath('PATH');
logger.logFolderPath('./logs');

Version Explenation

Example Version: v1.2.3

  • 1 = Project Stage Currently, no Plans for this Number.

  • 2 = Major Update Major updates are Updates where the code majorly changes, so you as a consumer have to check the functionality of your program while using this package.

  • 3 = Minor Update Minor updates just updates little stuff, so there are no necessary but nice to have. Here will be no changes for functions or else.