From 7d0b7329feb7eb0ca438fe5a69ca5f331a976f33 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Fri, 16 Dec 2016 15:32:09 -0600 Subject: [PATCH] Fix readme --- README.md | 4 ++-- lib/timber/log_devices/http.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ae8c4c65..c2e6fc1f 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Logger.warn "Payment rejected for customer abcd1234, reason: Card expired" # Structured hash Logger.warn message: "Payment rejected", type: :payment_rejected, - data: %{customer_id: "abcd1234", amount: 100, reason: "Card expired"} + data: {customer_id: "abcd1234", amount: 100, reason: "Card expired"} # Using a Struct PaymentRejectedEvent = Struct.new(:customer_id, :amount, :reason) do @@ -120,7 +120,7 @@ A few example queries: > This is all gravy, but wouldn't the extra data get expensive? -If you opt use the [Timber Console](https://timber.io), we only charge for +If you opt to use the [Timber Console](https://timber.io), we only charge for the size of the `message`, `dt`, and `event.custom` attributes. Everything else is stored at no cost to you. [Say wha?!](http://i.giphy.com/l0HlL2vlfpWI0meJi.gif). This ensures pricing remains predictable. We charge per GB sent to us and retained. No user limits, diff --git a/lib/timber/log_devices/http.rb b/lib/timber/log_devices/http.rb index ecc4f138..3d008441 100644 --- a/lib/timber/log_devices/http.rb +++ b/lib/timber/log_devices/http.rb @@ -23,7 +23,7 @@ class HTTP https.open_timeout = 10 end DELIVERY_FREQUENCY_SECONDS = 2.freeze - RETRY_LIMIT = 3.freeze + RETRY_LIMIT = 5.freeze BACKOFF_RATE_SECONDS = 3.freeze @@ -68,7 +68,7 @@ def initialize(api_key, options = {}) @last_messages_overflow_count = 0 messages_overflown_count = @buffer.messages_overflown_count - if messages_overflown_count >= @last_messages_overflow_count + if messages_overflown_count > @last_messages_overflow_count difference = messages_overflown_count - @last_messages_overflow_count @last_messages_overflow_count = messages_overflown_count logger.warn("Timber HTTP buffer has overflown #{difference} times")