Skip to content

Commit

Permalink
Skip empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 26, 2010
1 parent 6f251a3 commit 56afe2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Log.prototype = {
this.stream.setEncoding('ascii');
this.stream.on('data', function(chunk){
chunk.split('\n').map(function(line){
if (!line.length) return;
var captures = line.match(/^\[([^\]]+)\] (\w+) (.*)/);
var obj = {
date: new Date(captures[1])
Expand Down

0 comments on commit 56afe2d

Please sign in to comment.