architect-winston-logger

2.0.1 • Public • Published

architect-winston-logger

Wrapper for using winston as an architect plugin

Prerequisites

  • Include this package as an architect plugin in your application.
  • Inject loggerFactory by declaring it in the consumes array of one of your plugins

Usage


module.exports = function (options, imports) {
  var loggerA = imports.loggerFactory.create('loggerA', 'task1');

  loggerA.log('info', 'Something wrong');
  // info: [task1] Something wrong

  var loggerB = loggerA.createChild('subtask2');
  loggerB.log('info', 'Something else');
  // info: [task1:subtask2] Something else

  loggerB.destroy();

};

Readme

Keywords

none

Package Sidebar

Install

npm i architect-winston-logger

Weekly Downloads

1

Version

2.0.1

License

MIT

Last publish

Collaborators

  • matmar10