alphalogger
v1.2.1
Published
A Logger to log to a file and console
Downloads
2
Maintainers
Readme
AlphaLogger
AlphaLogger is a simple Logging package meant to log things to files. The reason I made this is because I never could find any package that does what I wanted.
To Get started here is a simple example
const Logger = require("alphalogger")
const logger = new Logger({
path: "./Logs", // The DIR the logs will be
fileName: "{DATE}.log", // The Name of the file >> "2022-0-1.log"
logFormat: "[{DATE} {TYPE}] {MESSAGE}", // The Log Format >> "[1/2/2022, 11:15:39 AM INFO] Hi"
logTypes: ["DEBUG", "INFO", "WARN", "ERROR"], // The Log Types, It will throw errors if you use a invalid type
consoleLog: true, // If it will log it to the console
logCheck: false, // If set to false it won't throw an error if you use a invalid log Type
})
logger.log("INFO", "Hi")
License
This Package Uses a MIT License. Follow it.