Skip to content

Commit 0ac4623

Browse files
committed
[fix] Backport #1281 onto 2.x for maintenance.
1 parent 78d25c6 commit 0ac4623

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/winston/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ exports.serialize = function (obj, key) {
388388
// `tail -f` a file. Options must include file.
389389
//
390390
exports.tailFile = function(options, callback) {
391-
var buffer = new Buffer(64 * 1024)
391+
var buffer = Buffer.alloc(64 * 1024)
392392
, decode = new StringDecoder('utf8')
393393
, stream = new Stream
394394
, buff = ''

lib/winston/transports/http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Http.prototype._request = function (options, callback) {
7979
res.resume();
8080
});
8181

82-
req.end(new Buffer(JSON.stringify(options), 'utf8'));
82+
req.end(new Buffer.from(JSON.stringify(options), 'utf8'));
8383
};
8484

8585
//

0 commit comments

Comments
 (0)