Custom formatted console logs designed to be used in Discord bots!
Default logs
Logs with spacing enabled
After installing run npm run test
for a full test and demo.
To install simply run npm install dbot-console-logger
Then require with const log = require('dbot-console-logger');
.
Settings such as changing the time, timestamp format, logging colors and more can be found in the config.js
file.
log.error("text", "inspect (optional))
Logs errors to the console. Aliases:
e
,err
log.warn("text", "inspect (optional))
Logs errors to the console. Aliases:
w
,warning
log.info("text", "inspect (optional))
Logs errors to the console. Aliases:
i
,information
log.debug("text", "inspect (optional))
Logs errors to the console. Aliases:
d
,db
,bug
log.timestamp()
Logs a timestamp to the console. Aliases:
t
,ts
,time
log.chalk(options)
Passes chalk though. Learn more at https://www.npmjs.com/package/chalk. Aliases:
c
log.moment(options)
Passes moment.js though. Learn more at https://momentjs.com/docs/. Aliases:
m
If you need help or assistance please either ask in my Discord server or create a new issue.