@tonyaellie/logger
v1.1.2
Published
A logger with some stuff idk.
Downloads
7
Readme
logger
Logger for Tonya's projects.
Usage
Installation
With npm
:
npm install @tonyaellie/logger
Logging Messages
You can log multiple types of messages. Objects will be serialized and stack traces will be shown.
LOG
logger.log('message to log');
INFO
logger.info('message to log');
WARN
logger.warn('message to log');
ERROR
logger.error('message to log');
FATAL
logger.fatal('message to log');
DEBUG
logger.debug('message to log');
Clear Console
You can clear the console with:
logger.clear();
EVENT
logger.events.on('all', (time, prefix, msg) => {
do.something(`${time} - ${prefix} - ${msg}`)
});