diff --git a/lib/winston-mongodb.js b/lib/winston-mongodb.js index 7f27119..1d526d0 100644 --- a/lib/winston-mongodb.js +++ b/lib/winston-mongodb.js @@ -180,7 +180,7 @@ MongoDB.prototype.log = function (level, msg, meta, callback) { entry.level = level; entry.meta = helpers.prepareMetaData(meta); if (self.storeHost) { - entry.hostname = this.hostname; + entry.hostname = self.hostname; } col.save(entry, { safe: self.safe }, function (err) { diff --git a/package.json b/package.json index c9b3b57..35efb0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "winston-mongodb", - "version": "0.5.0", + "version": "0.5.1", "description": "A MongoDB transport for winston", "author": "Charlie Robbins ", "contributors": [