Module: EventStore::HTTP::Write::LogText

Defined in:
lib/event_store/http/write/log_text.rb

Class Method Summary collapse

Class Method Details

.attributes(batch, stream, expected_version = nil, response: nil) ⇒ Object



5
6
7
8
9
10
11
12
13
# 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