Skip to content

Commit

Permalink
fix: set location from options
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinkrustev committed Oct 14, 2019
1 parent 06cf67e commit b548297
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/bunyan.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b548297

Please sign in to comment.