psyche-logger
v1.0.1
Published
a fast light weight logger
Downloads
4
Readme
Psyche Logger
a fast light weight logger
usage:
const psyche = require("psyche-logger").default; //import the echo logger
import psyche from "psyche-logger"; // using ES modules
// initialize the logger with a optional log file, if not given the peramaters it will create its own log file.
const logger = new psyche("log_file.lg");
// log a message
logger.info("HEADER NAME", "this is an info!"); //output: [INFO] [HEADER NAME] this is an info!
logger.warn("HEADER NAME", "this is a warning!"); //output: [WARN] [HEADER NAME] this is a warning!
logger.err("HEADER NAME", "this is an error!"); //output: [ERROR] [HEADER NAME] this is an error!
logger.notif("HEADER NAME", "this is a notice!"); //output: [NOTICE] [HEADER NAME] this is a notice!