Skip to content

Commit

Permalink
Clean logs text before printing it out, closes #18
Browse files Browse the repository at this point in the history
  • Loading branch information
yamalight committed Sep 14, 2016
1 parent 428ea50 commit 0fd8c13
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ export default (yargs) =>
console.error(e);
});
logStream.on('data', buf => {
const d = buf.toString().replace(/\n$/, '');
console.log(d);
const d = buf.toString();
const lines = d.split('\n');
lines
.map(line => line.replace(/^\u0001.+?\//, '').replace(/\n+$/, ''))
.filter(line => line && line.length > 0)
.forEach(line => console.log(line));
});
} else {
console.log(chalk.green('No running services found!'));
Expand Down

0 comments on commit 0fd8c13

Please sign in to comment.