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

@classycrafter/super-logger

v2.0.0

Published

A super customisable logger

Downloads

34

Readme

A super customisable and advanced logger.

Utilisation & Examples

To install it, run the following command:

npm i @classycrafter/super-logger

Code Example

const superlogger = require('@classycrafter/super-logger');

const myLogger = new superlogger.Logger({
    name: "Example",
    timezone: "Europe/Paris",
    tzformat: 24,
    dirpath: "./logstest",
    writelogs: true,
    colored: true,
    custom: {
        character: "*",
        gray: "#bbbbbb",
        namecolor: "#ff0000",
        processcolor: "#ff6400",
        titlecolor: "#00ff78",
        textcolor: "#00ff8f",
        datecolor: "#00a6ff"
    }
});


// Examples
myLogger.info("This is an info example", "OptionalProcess");
myLogger.warn("This is a warn example", "OptionalProcess");
myLogger.error("This is an error example", "OptionalProcess");
myLogger.debug("This is a debug example", "OptionalProcess");
myLogger.custom("This is a custom example", "CustomTitle", "OptionalProcess");
myLogger.fatal("This is a fatal example", "OptionalProcess");

Remark You can alse customise the whole logger colors with the "colors" property in the logger options.

const superlogger = require('@classycrafter/super-logger');

const myLogger = new superlogger.Logger({
    name: "Example",
    timezone: "Europe/Paris",
    tzformat: 24,
    dirpath: "./logstest",
    writelogs: true,
    colored: true,
    colors: {
        grey: '#bbbbbb',
        gray: '#4C4C4C',
        blue: '#48ACF8',
        loggernamecolor: '#4CBAFF',
        processcolor: '#4C70FF',
        info: {
            color: '#59E77D',
            dark: '#11cc37',
            background: '#D2EED9',
            highlight: false,
        },
        debug: {
            color: '#68E3DF',
            dark: '#13aba4',
            background: '#D5F5F4',
            highlight: false,
        },
        warn: {
            color: '#F2D349',
            dark: '#c9a81b',
            background: '#FAEFBB',
            highlight: false,
        },
        error: {
            color: '#F6545C',
            dark: '#dc222c',
            background: '#FACBCD',
            highlight: false,
        },
        fatal   : {
            color: '#F71111',
            dark: '#9b0000',
            background: '#FAACAC',
            highlight: true,
        }
    }
});

Added support for typescript!

import * as superlogger from '@classycrafter/super-logger';

const myLogger = new superlogger.Logger({
    name: "Example",
    timezone: "Europe/Paris",
    tzformat: 24,
    dirpath: "./logstest",
    writelogs: true,
    colored: true,
    custom: {
        character: "*",
        gray: "#bbbbbb",
        namecolor: "#ff0000",
        processcolor: "#ff6400",
        titlecolor: "#00ff78",
        textcolor: "#00ff8f",
        datecolor: "#00a6ff"
    }
});

What's new?

In version 1.1.32 we fixed a big bug with the writeLogs and all things related to files. Please download latest release for a better experience. In version 1.1.33 we just added those What's New things. In version 1.4.34 we changed the way to stock logs. Now it's in multiple files ! In 1.4.35 we added that to the readme since we forgot...

New Version 2.0.00 -- Changed:

  • The logfile names for a better look
  • Added support for typescript (remake of the whole package from 0)
  • Optimised the package
  • Added a new property in the logger options: "colors" (possibility to customise the whole logger colors)
  • Added "debug" function
  • Added "fatal" function (which is the same as "error" but with a different color & exits the process)

Additional Information

This package is under GNU GPL 3.0. Use the package as your wishes. WE AREN'T RESPONSIBLE FOR WHAT YOU DO WITH THE PACKAGE! You found a bug? Report it on the GitHub or send me an email ([email protected])! Any suggestions? Send them on the GitHub by opening an Issue or send me an email ([email protected])!