1.5.38 • Published 3 years ago

simply-logger v1.5.38

Weekly downloads
-
License
GNU 3.0
Repository
github
Last release
3 years ago

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...");

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!

1.5.38

3 years ago

1.4.38

3 years ago

1.3.38

3 years ago

1.3.37

3 years ago

1.3.27

3 years ago

0.3.27

3 years ago

0.3.26

3 years ago

0.3.25

3 years ago

0.2.25

3 years ago

0.2.24

3 years ago

0.2.23

3 years ago

0.1.23

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago