New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to make oink skip lines with bad character encoding #7

Open
wants to merge 4 commits into
base: master
from
Jump to file or symbol
Failed to load files and symbols.
+7 −2
Diff settings

Always

Just for now

Viewing a subset of changes. View all
Prev

make active record reporter skip log lines with bad characters

  • Loading branch information...
sgibbons committed Jan 26, 2011
commit b57f5c95ac96597f6d232a63e435189a2fdb536d
@@ -18,7 +18,12 @@ def print(output)
line = line.strip
# Skip this line since we're only interested in the Hodel 3000 compliant lines
next unless line =~ HODEL_LOG_FORMAT_REGEX
begin
next unless line =~ HODEL_LOG_FORMAT_REGEX
rescue => e
output.puts "\nSkipping malformed line" if @format == :verbose and e.message =~ /invalid byte sequence/
next
end
if line =~ /rails\[(\d+)\]/
pid = $1
@@ -65,4 +70,4 @@ def print(output)
end
end
end
ProTip! Use n and p to navigate between commits in a pull request.