Skip to content

Commit c139381

Browse files
fix(2020-day-04): suppress excess noise in run log
1 parent 2a050ca commit c139381

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

2020/day-04/solution.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const DEBUG = false;
12
const fs = require('fs')
23
const path = require('path')
34
const split2 = require('split2')
@@ -21,8 +22,10 @@ const part1 = () => {
2122
}
2223
} catch (e) {
2324
invalidCount++
24-
console.warn(e.message)
25-
console.debug('Invalid passport', passport)
25+
if (DEBUG) {
26+
console.warn(e.message)
27+
console.debug('Invalid passport', passport)
28+
}
2629
}
2730
totalCount++
2831
}

0 commit comments

Comments
 (0)