diff --git a/lib/build-logger.js b/lib/build-logger.js index 5795372..8479f08 100644 --- a/lib/build-logger.js +++ b/lib/build-logger.js @@ -27,6 +27,7 @@ module.exports = class Logger extends EventEmitter { // Log buffer this.buf = [] + this.printed = new Set() } onAuth(callback) { @@ -81,7 +82,7 @@ module.exports = class Logger extends EventEmitter { this.printLog(b.log) } this.buf = this.buf.slice(idx) - }, 300) + }, 500) this.buf.push({ log, timer }) } @@ -112,6 +113,10 @@ module.exports = class Logger extends EventEmitter { } printLog(log) { + if (this.printed.has(log.id)) return + + this.printed.add(log.id) + const data = log.object ? JSON.stringify(log.object) : log.text if (log.type === 'command') { diff --git a/package.json b/package.json index d8c1da6..6969a9d 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "serve": "5.1.5", "single-line-log": "1.1.2", "slackup": "2.0.1", - "socket.io-client": "2.0.1", + "socket.io-client": "1.7.4", "split-array": "1.0.1", "strip-ansi": "3.0.1", "stripe": "4.22.0",