Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Latest commit

 

History

History
37 lines (24 loc) · 1.12 KB

API.md

File metadata and controls

37 lines (24 loc) · 1.12 KB

Jethro API Docs Build Status npm version npm downloads Gratipay

Logging API

Direct-to-console logging

logger.output({
	severity:'warning', 
	source:'Logger',
	message:'Logger is already initialised!',
	timestamp: new Date(),
	location: os.hostname()
});

Just remember, using this method ONLY outputs to console, and no other transport is used and no event is emitted. It's basically a fancy console log, useful for welcome messages etc.

Event Emitter

The emitter:
logger.event.emit('logger', data)

This will emit straight into the matrix, make sure to be careful with emitted data, that it is correctly formatted and will not cause any of the other listeners and modules to error out

Utils

Documented in a future update