lib/stackify/agent_client.rb in stackify-api-ruby-1.2.4 vs lib/stackify/agent_client.rb in stackify-api-ruby-1.2.7

- old
+ new

@@ -34,15 +34,15 @@ Stackify.log_internal_error 'AgentClient: log_exception should get StackifiedError object' end end def has_error msg - !msg.error.nil? + !msg['Ex'].nil? end def get_epoch msg - msg.date_millis + msg['EpochMs'] end def send_logs msgs, attempts = 3 @@sender.send_logs msgs, attempts end @@ -57,19 +57,19 @@ e = StringException.new(msg) e.set_backtrace(call_trace) e end ex = StackifiedError.new(ex, binding()) - Stackify.msgs_queue << Stackify::ProtobufLogObject.new(level, ex.message, caller[0], trans_id, log_uuid, ex).to_obj + Stackify.msgs_queue << Stackify::MsgObject.new(level, ex.message, caller[0], trans_id, log_uuid, ex).to_h else - Stackify.msgs_queue << Stackify::ProtobufLogObject.new(level, msg, caller[0], trans_id, log_uuid).to_obj + Stackify.msgs_queue << Stackify::MsgObject.new(level, msg, caller[0], trans_id, log_uuid).to_h end end end def log_exception_task level, ex, trans_id=nil, log_uuid=nil Stackify::ScheduleTask.new ({limit: 1}) do - Stackify.msgs_queue << Stackify::ProtobufLogObject.new(level, ex.message, caller[0], trans_id, log_uuid, ex).to_obj + Stackify.msgs_queue << Stackify::MsgObject.new(level, ex.message, caller[0], trans_id, log_uuid, ex).to_h end end private