simply-logger

1.5.38 • Public • Published

ram-api.js


Discord Server npm version npm downloads

A simple logger using Chalk 4.1.0 and Moment.

Utilisation & Example

To install it, run the following command:

npm i simply-logger

Old update

const myLogger = new simplylogger.Logger("MyLogger", "Europe/Paris");
//to
const myLogger = new simplylogger.Logger("MyLogger", "Europe/Paris", 12); //12 or 24  12 = Am/ PM 24 = 24 hour clock

Big new update

const myLogger = new simplylogger.Logger("MyLogger", "Europe/Paris")
// or
const myLogger = new simplylogger.Logger("MyLogger", "Europe/Paris", 24)
// to
const myLogger = new simplylogger.Logger("MyLogger", "Europe/Paris", 24, "./somepath", true); // the "./somepath" tell the directory to put file logs in and the true says if log in files is enabled

Code example:

// don't forget to require the module!
const simplylogger = require("simply-logger");

// creates the logger
const myLogger = new simplylogger.Logger("MyLogger", "Europe/Paris", 24, "./some/path", true); //change 24 to 12 for AM/PM

/* examples */

// Example info
myLogger.info("An info!");

// Example warn
myLogger.warn("A warn...");

// Example error
myLogger.error("Oh sh*t... an error...");

Additionnal Informations

This package is under GNU Public Licence 3.0. Use the packages as your wishes. If you find any bugs, please repport them at https://github.com/TheDogHusky/simply-logger/issues A suggestion? Send me an email or open an issue with the suggestion label! WE ARE NOT RESPONSIBLE FOR WHAT YOU DO WITH THE PACKAGE!

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i simply-logger

    Weekly Downloads

    2

    Version

    1.5.38

    License

    GNU 3.0

    Unpacked Size

    44.9 kB

    Total Files

    4

    Last publish

    Collaborators

    • classycrafter