Skip to content

Commit 7f82509

Browse files
committed
Add silence argument
1 parent a5131f0 commit 7f82509

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

bin.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ require("yargs")
1212
.option("clear", {
1313
describe: "Clear data before starting the runtime",
1414
})
15+
.option("silence", {
16+
describe: "Silence the console",
17+
})
1518
.option("debug", {
1619
describe: "Enable debug mode",
1720
})

server.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ if (!argv.debug) {
88
console.debug = () => {};
99
}
1010

11+
if (argv.silence) {
12+
console.log = () => {};
13+
console.info = () => {};
14+
console.warn = () => {};
15+
console.error = () => {};
16+
console.debug = () => {};
17+
}
18+
1119
if (argv.clear) {
1220
datastore.clear();
1321
}

0 commit comments

Comments
 (0)