From b548297ea50c0342c284746f8150cc05338308fe Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Mon, 14 Oct 2019 08:25:06 +0300 Subject: [PATCH] fix: set location from options --- modules/bunyan.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/bunyan.js b/modules/bunyan.js index 13d4f2c..356a5ef 100644 --- a/modules/bunyan.js +++ b/modules/bunyan.js @@ -58,7 +58,8 @@ function Bunyan(options) { params.service = options.service; params.impl = options.impl; params.env = options.env; - if (typeof window === 'undefined') { + params.location = options.location; + if (typeof window === 'undefined' && !params.location) { params.location = require('os').hostname(); } Object.assign(params, options.udf);