module EventStore::HTTP::Write::LogText

Public Class Methods

attributes(batch, stream, expected_version=nil, response: nil) click to toggle source
# File lib/event_store/http/write/log_text.rb, line 5
def self.attributes(batch, stream, expected_version=nil, response: nil)
  text = "BatchSize: #{batch.size}, Stream: #{stream}, ExpectedVersion: #{expected_version || '(none)'}"

  unless response.nil?
    text << ", StatusCode: #{response.code}, ReasonPhrase: #{response.message}"
  end

  text
end