Skip to content

Commit fafbb75

Browse files
committed
fix:util._extend is deprecated in node 22
Signed-off-by: HUAHUAI23 <[email protected]>
1 parent 3315d59 commit fafbb75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/logger.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var formatters = {
2929

3030
function Logger(options) {
3131
var defaults = JSON.parse(JSON.stringify(Logger.DEFAULTS));
32-
options = util._extend(defaults, options || {});
32+
options = Object.assign({}, defaults, options || {});
3333
var catcher = deLiner();
3434
var emitter = catcher;
3535
var transforms = [
@@ -103,7 +103,7 @@ function reLiner() {
103103
}
104104

105105
function objectifier() {
106-
return through(objectify, null, {autoDestroy: false});
106+
return through(objectify, null, { autoDestroy: false });
107107

108108
function objectify(line) {
109109
this.emit('data', {
@@ -127,7 +127,7 @@ function textFormatter(options) {
127127

128128
function textify(logEvent) {
129129
var line = util.format('%s%s', textifyTags(logEvent.tag),
130-
logEvent.msg.toString());
130+
logEvent.msg.toString());
131131
if (options.timeStamp) {
132132
line = util.format('%s %s', new Date(logEvent.time).toISOString(), line);
133133
}

0 commit comments

Comments
 (0)