daisuke-s
9/25/2016 - 11:48 AM

rails_log_parameters.rb

#! /usr/bin/env ruby

str = 'I, [2014-09-04T05:17:29.385333 #19220]  INFO -- :   Parameters: {"users"=>{"profile_url"=>"https://example.com/users/123", "status"=>"1"}}'

matches = /[DIWE], \[([0-9\-T:\.]+).* Parameters: ({.*)/.match(str)

matches.to_a.each_with_index do |m, index|
  puts "#{index}: #{m}"
end