const logger = require('disjs-logger');
const console = new logger('C:\\Users\\Username\\ProjectDirectory\\logfile.txt');
// Double back slashes are used as single back slashes are escape chars
console.log("My error here", "error", __filename, `There was an error, please check the log file`)
- Content (STRING) - The content or error shown in the log file.
- Type (STRING) - The type of log, you can view the types below or input a custom type to use your own.
- Filename (STRING) - The file where the log was invoke, usually __filename.
- MTD (STRING) - The message to display in console when the log is invoked.
- Error - This is when you have an error of course, like my code (RED)
- Log - The standard log (BLUE)
- Warn - Input when you have a warning (YELLOW)
- Debug - Standard debug for your projects (GREY)
- Ready - Made for djs bots just to use in your ready event (GREEN)
- Success - Like the ready type but for when something goes right (GREEN)
- Perms - For when you need to say you have no permission in console (MAGENTA)
- Nodeexc - This is just a standard Uncaught Exception but formatted (RED)
- Noderejc - Again a standard Unhandled Rejection but formatted (RED)
- Input a type other than these and it will still show, this is where the custom type comes in (Custom logs will always be blue)
You can find all the examples in the file called examples.js
Made with โฅ by IceyyM8