Comparing version 8.21.5 to 8.27.0
30
index.js
@@ -12,25 +12,25 @@ 'use strict'; | ||
module.exports.getLogger = function(name, opts) { | ||
let matches; | ||
let options; | ||
let matches; | ||
let options; | ||
let logLevel; | ||
let logLevel; | ||
opts = opts || {}; | ||
opts = opts || {}; | ||
logLevel = process.env.LOG_LEVEL || 'info'; | ||
logLevel = process.env.LOG_LEVEL || 'info'; | ||
matches = name.match(/\/[^\/]+$/g); | ||
if (matches) { | ||
name = matches[0]; | ||
} | ||
matches = name.match(/\/[^\/]+$/g); | ||
if (matches) { | ||
name = matches[0]; | ||
} | ||
options = {}; | ||
options.name = name; | ||
options.stream = process.stdout; | ||
options.level = logLevel; | ||
options = {}; | ||
options.name = name; | ||
options.stream = process.stdout; | ||
options.level = logLevel; | ||
console.log('LOG_LEVEL is', options.level); | ||
// console.log('LOG_LEVEL is', options.level); | ||
return bunyan.createLogger(options); | ||
return bunyan.createLogger(options); | ||
}; |
{ | ||
"name": "logb", | ||
"version": "8.21.5", | ||
"version": "8.27.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
2012