Skip to content
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

Dump payload when we are writing to file. #198

Merged
merged 2 commits into from
Jan 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gemfiles/rails31.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ gem "minitest", :platform => :rbx
gem "rubysl-test-unit", :platform => :rbx
gem "rubinius-developer_tools", :platform => :rbx
gem "rails", "3.1.12"
gem 'i18n', '~> 0.6.0'

gemspec :path => "../"
1 change: 1 addition & 0 deletions gemfiles/rails32.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ gem "minitest", :platform => :rbx
gem "rubysl-test-unit", :platform => :rbx
gem "rubinius-developer_tools", :platform => :rbx
gem "rails", "3.2.17"
gem 'i18n', '~> 0.6.0'

gemspec :path => "../"
4 changes: 3 additions & 1 deletion lib/rollbar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,14 @@ def write_payload(payload)
def do_write_payload(payload)
log_info '[Rollbar] Writing payload to file'

body = dump_payload(payload)

begin
unless @file
@file = File.open(configuration.filepath, "a")
end

@file.puts payload
@file.puts(body)
@file.flush
log_info "[Rollbar] Success"
rescue IOError => e
Expand Down