timber 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0432ed485c5f9ddbe423ae464cabe9365ac1eefc
4
- data.tar.gz: 2051b18db981d2542497cb6b26813ce272625833
3
+ metadata.gz: 97ff67ce5ee816c4e3d97ffdbc1cf23694ee64ca
4
+ data.tar.gz: 7c0cacdf4b39ac5c5317efbcd5ad9b12988566af
5
5
  SHA512:
6
- metadata.gz: 7e9f7183d5447b599b50cd6ca3e566be9e12179209eb1bc26177a71a61d2238bde6abe806593fc5fa0ca08aa4ad5efebf4414c5a72e9afe9745af3276859da09
7
- data.tar.gz: 680b421e9412c3e814cc4d116670d2ae583a019501769bd117347b960850fd656f8cc1eacc6cce26e1f0f92cb78c49ea97b0c74c2f7772ad23ccd6fa01004020
6
+ metadata.gz: 868987f6f4841a52f50b564068f4a93da5692154056d12e56cfdb951958fa868eada0bd53ac78484e0a79263cf624bd8f3fa13254961b5a8436f9fd8e2906222
7
+ data.tar.gz: fc9890d02ac9ca868d8ba28f3e18e6d940f95a3be97f87b9c989278493eb4d4093e2770cf1f6d0837e662e08f2e0e562241569a5eff34b141817efc7ff442993
data/README.md CHANGED
@@ -13,10 +13,12 @@
13
13
 
14
14
  ## Overview
15
15
 
16
- Timber turns your raw text logs into rich JSON events that can be consumed by the
17
- [Timber.io service](https://timber.io). It improves log data quality at the source, adding
18
- critical `event` and `context` data to your logs so that you can filter out the noise and
19
- solve problems faster.
16
+ Timber for Ruby is an optional upgrade you can install for Ruby apps on the
17
+ [Timber.io logging platform](https://timber.io). It turns your once raw text logs into
18
+ [rich JSON events that contain critical event and context data](https://timber.io/docs/elixir/automatic-schema-and-fields).
19
+ These events conform to the [Timber normalized JSON schema](https://timber.io/docs/app/schema-fields)
20
+ and dramatically improve the quality of your logs; allowing you to filter out the noise and solve
21
+ problems faster.
20
22
 
21
23
  For example, Timber turns this:
22
24
 
@@ -30,7 +32,7 @@ Into this:
30
32
  Sent 200 in 45.2ms @metadata {"dt": "2017-02-02T01:33:21.154345Z", "level": "info", "context": {"user": {"id": 1, "name": "Ben Johnson"}, "http": {"method": "GET", "host": "timber.io", "path": "/path", "request_id": "abcd1234"}}, "event": {"http_server_response": {"status": 200, "time_ms": 45.2}}}
31
33
  ```
32
34
 
33
- Allowing you to run queries in the [Timber console](https://app.timber.io) like:
35
+ Allowing you to run extremely powerful queries in the [Timber console](https://timber.io/docs/app/overview/) like:
34
36
 
35
37
  1. `context.request_id:abcd1234` - View all logs generated for a specific request.
36
38
  2. `context.user.id:1` - View logs generated by a specific user.
@@ -38,6 +40,8 @@ Allowing you to run queries in the [Timber console](https://app.timber.io) like:
38
40
  4. `http_server_response.time_ms:>=1000` - View slow responses with the ability to zoom out and view them in context (request, user, etc).
39
41
  5. `level:error` - Levels in your logs!
40
42
 
43
+ For a complete overview, see the [Timber for Ruby docs](https://timber.io/docs/ruby/overview/).
44
+
41
45
 
42
46
  ## Installation
43
47
 
@@ -56,13 +60,14 @@ Allowing you to run queries in the [Timber console](https://app.timber.io) like:
56
60
 
57
61
  All configuration options can be seen in the
58
62
  [`Timber::Config docs`](http://www.rubydoc.info/github/timberio/timber-ruby/Timber/Config).
59
-
60
- Here's a few popular options:
63
+ Here are a few popular options:
61
64
 
62
65
  1. `config.timber.format =`
63
- * `:default` - This is the default. It's the original, default, unchanged log messages.
64
- * `:lograge` - Works exactly like [lograge](https://github.com/roidrage/lograge), except Timber's
65
- additional context and metadata is also appended. Lograge++.
66
+
67
+ * `:default` - This is the default. It's the original, default, unchanged log messages.
68
+
69
+ * `:lograge` - Works exactly like [lograge](https://github.com/roidrage/lograge), except Timber's
70
+ additional context and metadata is also appended. Lograge++.
66
71
 
67
72
 
68
73
 
@@ -47,11 +47,11 @@ module Timber
47
47
  # We don't have an opportunity to intercept this since the :initialize_logger
48
48
  # initializer loads these modules. Moreover, earlier version of rails don't do this
49
49
  # at all, hence the defined? checks. Yay for being implicit.
50
- ::ActionCable::Server::Base.logger = logger if defined?(::ActionCable::Server::Base)
51
- ::ActionController::Base.logger = logger if defined?(::ActionController::Base)
50
+ ::ActionCable::Server::Base.logger = logger if defined?(::ActionCable::Server::Base) && ::ActionCable::Server::Base.respond_to?(:logger=)
51
+ ::ActionController::Base.logger = logger if defined?(::ActionController::Base) && ::ActionController::Base.respond_to?(:logger=)
52
52
  ::ActionMailer::Base.logger = logger if defined?(::ActionMailer::Base) && ::ActionMailer::Base.respond_to?(:logger=)
53
53
  ::ActionView::Base.logger = logger if defined?(::ActionView::Base) && ::ActionView::Base.respond_to?(:logger=)
54
- ::ActiveRecord::Base.logger = logger if defined?(::ActiveRecord::Base)
54
+ ::ActiveRecord::Base.logger = logger if defined?(::ActiveRecord::Base) && ::ActiveRecord::Base.respond_to?(:logger=)
55
55
  ::Rails.logger = logger
56
56
  end
57
57
 
@@ -1,3 +1,3 @@
1
1
  module Timber
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.5"
3
3
  end
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: 2.0.4
4
+ version: 2.0.5
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-03-23 00:00:00.000000000 Z
11
+ date: 2017-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack