Skip to content

icedoesjs/disjs-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disjs Logger



NPM Banner



📜 Usage

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`)

✍ Arguements & Paramaters

  • 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.

Types

  • 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)

📦 Dependencies

📂 Examples

You can find all the examples in the file called examples.js

🧑 Contact

Made with ♥ by IceyyM8


About

A lightweight, customizable and simple discord.js logger made for bots

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published