Skip to content

Commit

Permalink
log all /fail messages as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
crucialfelix committed Apr 21, 2016
1 parent 1696372 commit 82bfdcc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ export class Server extends EventEmitter {
}
this.log.sendosc(out);
});
this.receive.subscribe((o) => this.log.rcvosc(o), (err) => this.log.err(err));
this.receive.subscribe((o) => {
this.log.rcvosc(o);
// log all /fail responses as error
if (o[0] === '/fail') {
this.log.err(o);
}
}, (err) => this.log.err(err));
this.stdout.subscribe((o) => this.log.stdout(o), (o) => this.log.stderr(o));
this.processEvents.subscribe((o) => this.log.dbug(o), (o) => this.log.err(o));
}
Expand Down

0 comments on commit 82bfdcc

Please sign in to comment.