8000 Update redis.js · LikeABossProgrammer/log4js-node@09ed794 · GitHub
[go: up one dir, main page]

Skip to content

Commit 09ed794

Browse files
authored
Update redis.js
1 parent 3382b54 commit 09ed794

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

lib/appenders/redis.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,11 @@ function redisAppender(host, port, pass, channel, layout) {
2323
}
2424

2525
function configure(config) {
26-
let layout;
27-
let host;
28-
let port;
29-
let pass;
30-
let channel;
31-
if (config.layout) {
32-
layout = layouts.layout(config.layout.type, config.layout);
33-
}
34-
host = config.host ? config.host : '127.0.0.1';
35-
port = config.port ? config.port : 6379;
36-
pass = config.pass ? config.pass : '';
37-
channel = config.channel ? config.channel : 'log';
26+
const layout = config.layout ? layouts.layout(config.layout.type, config.layout) : null;
27+
const host = config.host ? config.host : '127.0.0.1';
28+
const port = config.port ? config.port : 6379;
29+
const pass = config.pass ? config.pass : '';
30+
const channel = config.channel ? config.channel : 'log';
3831
return redisAppender(host, port, pass, channel, layout);
3932
}
4033

0 commit comments

Comments
 (0)
0