diff --git a/lib/server.js b/lib/server.js index 91324ee..efec8d1 100644 --- a/lib/server.js +++ b/lib/server.js @@ -41,6 +41,21 @@ module.exports = function (config) { level: 'debug' }) } + /* istanbul ignore next */ + if (config.beeline) { + logger.addStream({ + name: 'beeline-logger', + type: 'raw', + stream: { + write: data => { + if (data.event === 'REQUEST') return + config.beeline.finishSpan(config.beeline.startSpan(data)) + } + }, + level: 'debug' + }) + } + logger.middleware = bunyanMiddleware(getMiddlewareConfig(config, logger)) return logger } diff --git a/package.json b/package.json index 6e12140..9e64778 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kuali-logger", - "version": "0.2.3", + "version": "0.2.4", "description": "Standardized logger for Kuali apps", "main": "lib/index.js", "scripts": {