trvsdnn / chainsaw

Slice up log files into the time-filtered chunks you want

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid byte sequence in US-ASCII

hrdwdmrbl opened this issue · comments

When I try to use chainsaw, I get the error every time. I've tried

chainsaw production.log yesterday
chainsaw production.log 2012-10-01

The full error is

/home/ubuntu/.rvm/gems/ruby-1.9.3-p125/gems/chainsaw-0.0.8/lib/chainsaw/filter.rb:30:in `match': invalid byte sequence in US-ASCII (ArgumentError)
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p125/gems/chainsaw-0.0.8/lib/chainsaw/filter.rb:30:in `match'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p125/gems/chainsaw-0.0.8/lib/chainsaw/filter.rb:30:in `block in start'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p125/gems/chainsaw-0.0.8/lib/chainsaw/filter.rb:28:in `each_line'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p125/gems/chainsaw-0.0.8/lib/chainsaw/filter.rb:28:in `start'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p125/gems/chainsaw-0.0.8/lib/chainsaw/filter.rb:101:in `filter'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p125/gems/chainsaw-0.0.8/lib/chainsaw/cli.rb:110:in `run'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p125/gems/chainsaw-0.0.8/bin/chainsaw:6:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p125/bin/chainsaw:19:in `load'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p125/bin/chainsaw:19:in `<main>'

As you can see, I'm using Ruby 1.9.3 with RVM and using chainsaw 0.0.8 on Ubuntu 11.10

Looks like an encoding problem. I'm guessing your logfile has non-ascii characters in it. Looking into it.

WOW! So fast reply. I can grep for any specific characters if it might help...

I should be able to produce a test case for this. Should be a simple fix.

Pushed a new version, see if that works for you.

Like a charm! Thank you thank you!!