UNPKG

@pryv/boiler

Version:

Logging and config boilerplate library for Node.js apps and services at Pryv

25 lines (21 loc) 513 B
/** * @license * [BSD-3-Clause](https://github.com/pryv/pryv-boiler/blob/master/LICENSE) */ module.exports = { init, log }; async function init (settings) { console.log('CUSTOM LOGGER initilaized with', settings); } /** * * @param {string} level one of 'debug', 'info', 'warn', 'error' * @param {string} key ':' namespaced keys * @param {message} message * @param {object} meta */ function log (level, key, text, meta) { console.log('Custom: ' + JSON.stringify({ level, key, text, meta })); }