timber 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8edaf795dfbf8e705fb737cdb7f43ce3821ef2f
4
- data.tar.gz: e2d21bde5b38fe63b346070cf0e5ac4f86e158ed
3
+ metadata.gz: 711c51f2448d07c0149c2c13fe73d15b42d5314e
4
+ data.tar.gz: 1cedd7c199a732958fab544e6890e9b4589071a7
5
5
  SHA512:
6
- metadata.gz: 162e70c46240ca58184950aa7165ff146f2f7b7e78c7e012a694b3aa97b968112870327a8bba978e503ab8a418b86989e8fdecacdf61c6dcefb4204d239322b3
7
- data.tar.gz: fdbbff594c9caf2a773db228648f8384c5e345b120d90878ea25289dab529955ce762af955fd0a73de9d00c5fabc22085ef6733ed2a41d3cef0643ae60d14c41
6
+ metadata.gz: ca1143f0d28d2b797be5b852fd835b62bdd0fb5aeaac3ace0f680e96301b86d5df4d93ee9d8a8f40dbbf1b84a244c8bce4abe793240eeef475650afe9520331f
7
+ data.tar.gz: ec709d117addb3085ac60c310c264c27ffc4f4b9c2bc1811cd2857302974131d53664c285dd11fbc798f56c49bca5d7b80a4f5afd0bdb11c753f924721994e21
data/README.md CHANGED
@@ -132,7 +132,10 @@ Timber will *never* deviate from the public `::Logger` interface in *any* way.
132
132
 
133
133
  <details><summary><strong>Tagging logs</strong></summary><p>
134
134
 
135
- Need a quick way to identify logs? Use tags!:
135
+ Tags provide a quick way to identify logs. They work just like any tagging system.
136
+ In the context of logging, they prevent obstructing the log message to
137
+ accomplish the same thing, while also being a step down from creating a classified custom
138
+ event. If the event is meaningful in any way, we recommend creating a custom event.
136
139
 
137
140
  ```ruby
138
141
  logger.info(message: "My log message", tag: "tag")
@@ -164,7 +167,7 @@ end
164
167
 
165
168
  </p></details>
166
169
 
167
- <details><summary><strong>Timings, Durations, & Metrics</strong></summary><p>
170
+ <details><summary><strong>Timings</strong></summary><p>
168
171
 
169
172
  Timings allow you to easily capture one-off timings in your code; a simple
170
173
  way to benchmark code execution:
@@ -297,6 +300,10 @@ gem 'timber'
297
300
 
298
301
  <details><summary><strong>Rails (all versions, including edge)</strong></summary><p>
299
302
 
303
+ 👉 **Prefer examples?** Checkout our the [Timber install example pull request](https://github.com/timberio/ruby-rails-example-app/pulls/1)
304
+
305
+ ---
306
+
300
307
  *Replace* any existing `config.logger=` calls in `config/environments/production.rb` with:
301
308
 
302
309
  ```ruby
@@ -305,9 +312,6 @@ gem 'timber'
305
312
  config.logger = ActiveSupport::TaggedLogging.new(Timber::Logger.new(STDOUT))
306
313
  ```
307
314
 
308
- * Prefer examples? Checkout our [Ruby / Rails example app](https://github.com/timberio/ruby-rails-example-app),
309
- you can see all changes by [search for "timber-change"](https://github.com/timberio/ruby-rails-example-app/search?utf8=%E2%9C%93&q=timber-change&type=Code).
310
-
311
315
  ---
312
316
 
313
317
  </p></details>
@@ -31,7 +31,7 @@ module Timber
31
31
  alias to_h to_hash
32
32
 
33
33
  def as_json(_options = {})
34
- {:server_side_app => {:custom => to_hash}}
34
+ {:custom => to_hash}
35
35
  end
36
36
 
37
37
  def to_json(options = {})
@@ -1,3 +1,3 @@
1
1
  module Timber
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -47,7 +47,7 @@ describe Timber::Logger, :rails_23 => true do
47
47
  expect(Timber::Events).to receive(:build).with(message).and_call_original
48
48
  logger.info(message)
49
49
  expect(io.string).to start_with("payment rejected @metadata {\"level\":\"info\",\"dt\":\"2016-09-01T12:00:00.000000Z\",")
50
- expect(io.string).to include("\"event\":{\"server_side_app\":{\"custom\":{\"payment_rejected\":{\"customer_id\":\"abcde1234\",\"amount\":100}}}}")
50
+ expect(io.string).to include("\"event\":{\"custom\":{\"payment_rejected\":{\"customer_id\":\"abcde1234\",\"amount\":100}}}")
51
51
  end
52
52
 
53
53
  it "should log properly when an event is passed" do
@@ -77,7 +77,7 @@ describe Timber::Logger, :rails_23 => true do
77
77
  {message: "payment rejected", payment_rejected: {customer_id: "abcde1234", amount: 100}}
78
78
  end
79
79
  expect(io.string).to start_with("payment rejected @metadata {\"level\":\"info\",\"dt\":\"2016-09-01T12:00:00.000000Z\",")
80
- expect(io.string).to include("\"event\":{\"server_side_app\":{\"custom\":{\"payment_rejected\":{\"customer_id\":\"abcde1234\",\"amount\":100}}}}")
80
+ expect(io.string).to include("\"event\":{\"custom\":{\"payment_rejected\":{\"customer_id\":\"abcde1234\",\"amount\":100}}}")
81
81
  end
82
82
 
83
83
  it "should escape new lines" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timber
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timber Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-19 00:00:00.000000000 Z
11
+ date: 2017-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack