Browse Source

Fix repeated logs and corrupted characters (#611)

* revert socket.io-client version for now

* don't print duplicated build logs
master
Naoyuki Kanezawa 8 years ago
committed by Guillermo Rauch
parent
commit
f29cb1c69e
  1. 7
      lib/build-logger.js
  2. 2
      package.json

7
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') {

2
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",

Loading…
Cancel
Save