Skip to content

Commit 8372346

Browse files
you're a docker container why tf are you logging to disk
1 parent a4a5f13 commit 8372346

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

lib/configuration/sample.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"scheduledCommands":["!youtube", "!schedule"],
1212
"logger": {
13-
"logToFile": false
13+
"level": "debug"
1414
},
1515
"overRustle": {
1616
"url": "https://overrustlelogs.net"

lib/services/logger.js

+7-13
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,13 @@ const bunyan = require('bunyan');
33
function configureLogger(config) {
44
const bunyanConf = { name: 'dggChatBot' };
55

6-
if (config.logToFile) {
7-
bunyanConf.streams = [
8-
{
9-
level: 'info',
10-
stream: process.stdout, // log INFO and above to stdout
11-
},
12-
{
13-
level: config.level,
14-
path: `${__dirname}../logs/errors.logs`, // log ERROR and above to a file
15-
},
16-
];
17-
}
18-
6+
bunyanConf.streams = [
7+
{
8+
level: config.level,
9+
stream: process.stdout, // log INFO and above to stdout
10+
}
11+
];
12+
1913
return bunyan.createLogger(bunyanConf);
2014
}
2115

0 commit comments

Comments
 (0)