lib/firephruby.rb in firephruby-0.2.1 vs lib/firephruby.rb in firephruby-0.2.2

- old
+ new

@@ -28,10 +28,10 @@ t_pref,g_kind = kind == 'DUMP' ? [ 2, 'DUMP' ] : [ 1, 'LOG' ] file, line, function = caller[2].split ':' msg_meta = { 'Type' => kind, 'File' => file, 'Line' => line } msg_meta['Label'] = label if label @fire_msg_index = 0 unless instance_variables.member? '@fire_msg_index' - msg = _firephruby_mask_ruby_types msg if ( @firephruby_options.has_key? :mask_ruby_types && :mask_ruby_types ) + msg = _firephruby_mask_ruby_types( Marshal.load(Marshal.dump(msg)) ) if ( @firephruby_options.has_key? :mask_ruby_types && :mask_ruby_types ) msg = kind == 'DUMP' ? "{#{label.to_json}:#{msg.to_json}}" : "[#{msg_meta.to_json},#{msg.to_json}]" #puts msg.to_json (msg.gsub /.{#{MAX_LENGTH}}/ do |m| "#{m}\n" end).split( "\n" ).each_with_index do |msg_part,ind| @fire_msg_index += 1 headers << [ "X-Wf-1-#{t_pref}-1-#{@fire_msg_index}", "#{msg.size if ind == 0}|#{msg_part}|#{'\\' if ind < msg.size/MAX_LENGTH}" ] # int/int = int