UNPKG

waigo

Version:

Node.js ES6 framework for reactive, data-driven apps and APIs (Koa, RethinkDB)

20 lines (11 loc) 387 B
"use strict"; const waigo = global.waigo, _ = waigo._, logger = waigo.load('support/logger').create('LogNotifier'); module.exports = function*(App, id, config) { let _logger = logger.create(id); return function*(messageOrObject) { let msg = (typeof messageOrObject === 'string' ? messageOrObject : JSON.stringify(messageOrObject)); _logger.info(msg); }; };