Module: EventStore::HTTP::ReadStream::LogText

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

Class Method Summary collapse

Class Method Details

.attributes(stream, position, batch_size, direction, response: nil) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/event_store/http/read_stream/log_text.rb', line 5

def self.attributes(stream, position, batch_size, direction, response: nil)
  text = "Stream: #{stream}, Position: #{position}, BatchSize: #{batch_size}"

  unless response.nil?
    text << ", StatusCode: #{response.code}, ReasonPhrase: #{response.message}, ContentLength: #{response.body&.bytesize.to_i}"
  end

  text
end