messenger-req-log
Use your web server’s request logger in your bot (
messenger-core
plugin)
This plugin will output your Bot’s log messages to the web server’s logger. Just use context.log[info|debug|error]
as usual and benefit from the web server’s log configuration (log levels, log targets, etc)
Installation
$ npm install --save messenger-req-log
Usage
const MessengerLog = { return messenger }
with Express or Restify
const app = const messenger = app
with Micro
const messenger = moduleexports =
Ideas
- Create & use a child logger if the server’s logger has a
child()
function (like Bunyan does)
License
MIT © Andreas Pizsa