a simple logger that adds times log type and also add the logs to a file
make an env file that will contain your config options
this is the path you will store all your log files in
- starting it with ./ will make it relative to your project directory
- starting it with / will make it relative to your root and you have to specify a full path
it is a good idea to place it in a logs direcotry because it makes multible archive files which can get messy
default: ./logs
if you want your log files to be prefixed with the type of log it is eg success, error.
default: false
MCSB_LOGGER_PATH=./logs
MCSB_LOGGER_FILE_PREFIX=true
install the module
npm i mcstatusbot-logger
require('dotenv').config();
const logger = require('mcstatusbot-logger');
logger.success("you are now using logger by@mcstatusbot.site");
logger.info("you are now using logger by mcstatusbot.site");
sends a success message
sends a info message
sends a warn message
sends a error message
sends a crash message