timber 2.1.8 → 2.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +15 -11
- data/lib/timber/cli/api.rb +0 -2
- data/lib/timber/cli/installers/root.rb +5 -5
- data/lib/timber/current_context.rb +1 -1
- data/lib/timber/version.rb +1 -1
- data/spec/timber/current_context_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44f09308d7bdbfa11aec261d744e1f7f6079a42a
|
4
|
+
data.tar.gz: 10865ebbb111847407a005bf74ff5984674bbc31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4a0ebcf64ab5dfe47073507f5fa5cebebb341266d4bcc848ff534ae9d0655ff50a3f245211ad9a437b46cc1fc8facf9ca5a7237a5db33a81da9d7d364333b88
|
7
|
+
data.tar.gz: d3bfdd5c5cd102b1bf257f4860c610c43b10a2885412b74fa502afa03300295dd0337de5fc14bdbc4e019699479ef7e2dc205b6d8873ee766796808431c6effa
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
[![Build Status](https://travis-ci.org/timberio/timber-ruby.svg?branch=master)](https://travis-ci.org/timberio/timber-ruby)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/timberio/timber-ruby/badges/gpa.svg)](https://codeclimate.com/github/timberio/timber-ruby)
|
7
7
|
|
8
|
-
[Timber](https://timber.io) is a cloud-based logging system that integrates directly with your
|
9
|
-
|
10
|
-
that are easier to search and use:
|
8
|
+
[Timber](https://timber.io) is a cloud-based logging system that integrates directly with your Ruby
|
9
|
+
app through this library, capturing context and metadata without parsing. This produces rich, clean,
|
10
|
+
readable logs that are easier to search and use:
|
11
11
|
|
12
12
|
1. [**Installation** - One command: `bundle exec timber install`](#installation)
|
13
13
|
2. [**Usage** - Simple yet powerful API](#usage)
|
@@ -308,14 +308,18 @@ couldn't otherwise. This automatically upgrades logs produced by these libraries
|
|
308
308
|
[easier to search and use](#do-amazing-things-with-your-logs). Below is a list of libraries we
|
309
309
|
support:
|
310
310
|
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
311
|
+
* Frameworks & Libraries
|
312
|
+
* [**Rails**](https://timber.io/docs/languages/ruby/integrations/rails)
|
313
|
+
* [**Rack**](https://timber.io/docs/languages/ruby/integrations/rack)
|
314
|
+
* [**Devise**](https://timber.io/docs/languages/ruby/integrations/devise)
|
315
|
+
* [**Clearance**](https://timber.io/docs/languages/ruby/integrations/clearnace)
|
316
|
+
* [**Omniauth**](https://timber.io/docs/languages/ruby/integrations/omniauth)
|
317
|
+
* [**Warden**](https://timber.io/docs/languages/ruby/integrations/devise)
|
318
|
+
* Platforms
|
319
|
+
* [**Heroku**](https://timber.io/docs/languages/ruby/integrations/heroku)
|
320
|
+
* [**System / Server**](https://timber.io/docs/languages/ruby/integrations/system)
|
321
|
+
|
322
|
+
...more coming soon! Make a request by [opening an issue](https://github.com/timberio/timber-ruby/issues/new)
|
319
323
|
|
320
324
|
|
321
325
|
## Get things done with your logs
|
data/lib/timber/cli/api.rb
CHANGED
@@ -55,9 +55,9 @@ module Timber
|
|
55
55
|
io.task(task_message) do
|
56
56
|
http_device = LogDevices::HTTP.new(api.api_key)
|
57
57
|
logger = Logger.new(http_device)
|
58
|
-
logger.
|
59
|
-
logger.
|
60
|
-
logger.
|
58
|
+
logger.debug("Welcome to Timber!")
|
59
|
+
logger.debug("This is a test log to ensure the pipes are working")
|
60
|
+
logger.debug("Be sure to commit and deploy your app to start seeing real logs")
|
61
61
|
# Close flushes and waits
|
62
62
|
http_device.close
|
63
63
|
end
|
@@ -68,8 +68,8 @@ module Timber
|
|
68
68
|
|
69
69
|
io.task(task_message) do
|
70
70
|
api.wait_for_logs do |iteration|
|
71
|
-
io.write
|
72
|
-
io.write
|
71
|
+
io.write(IO::Messages.task_start(task_message), :blue)
|
72
|
+
io.write(IO::Messages.spinner(iteration), :blue)
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|
@@ -149,7 +149,7 @@ module Timber
|
|
149
149
|
|
150
150
|
# Runtime context
|
151
151
|
thread_object_id = Thread.current.object_id
|
152
|
-
runtime_context = Contexts::
|
152
|
+
runtime_context = Contexts::Runtime.new(vm_pid: thread_object_id)
|
153
153
|
add_to!(new_hash, runtime_context)
|
154
154
|
|
155
155
|
new_hash
|
data/lib/timber/version.rb
CHANGED
@@ -7,6 +7,18 @@ describe Timber::CurrentContext, :rails_23 => true do
|
|
7
7
|
expect(context.send(:hash)[:release]).to be_nil
|
8
8
|
end
|
9
9
|
|
10
|
+
it "should set the system context" do
|
11
|
+
context = described_class.send(:new)
|
12
|
+
system_content = context.fetch(:system)
|
13
|
+
expect(system_content[:hostname]).to be_present
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should set the runtime context" do
|
17
|
+
context = described_class.send(:new)
|
18
|
+
runtime_context = context.fetch(:runtime)
|
19
|
+
expect(runtime_context[:vm_pid]).to be_present
|
20
|
+
end
|
21
|
+
|
10
22
|
context "with Heroku dyno metadata" do
|
11
23
|
around(:each) do |example|
|
12
24
|
ENV['HEROKU_SLUG_COMMIT'] = "2c3a0b24069af49b3de35b8e8c26765c1dba9ff0"
|
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.1.
|
4
|
+
version: 2.1.9
|
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-08-
|
11
|
+
date: 2017-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|