rain_catcher 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +9 -0
- data/lib/rain_catcher/railtie.rb +12 -1
- data/lib/rain_catcher/version.rb +1 -1
- data/rain_catcher-0.1.0.gem +0 -0
- data/rain_catcher.gemspec +2 -2
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5a8179b67bd0e585a9628916d516553f49c3b1c0023c469cdad1039a039f3e7
|
4
|
+
data.tar.gz: c1dfc52ef6467aead13a9028f51d076c94e0afbb212262d59e6a9c4b1c830ccb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 792732e90285d60a51980e97d1fd0e01b64248114020d721c93ca5b92bc4d555063ef6fb4621b83d65c78fc37a7ccac96e5796266f43e63a8f76231177aead42
|
7
|
+
data.tar.gz: c029628b26fabe140bb3ca97d06dc655e77f1734e117a14503cf66383995eee9ac1e24a8a92b46a4b00045f18f8eefb14796982e6f5d2b72626d80a1812d5afe
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -25,3 +25,12 @@ When each request is processed, if the configured interval has elapsed then a lo
|
|
25
25
|
|-|-|-|
|
26
26
|
| `RAIN_CATCHER_LOG_INTERVAL` | 30 | Minimum number of seconds between each log entry |
|
27
27
|
| `RAIN_CATCHER_LOG_LEVEL` | INFO | Log level to use for log entries |
|
28
|
+
| `RAIN_CATCHER_APPLICATION_NAME` | [inferred from Rails] | Application identifier which will be included in all log entries |
|
29
|
+
|
30
|
+
## Log Structure
|
31
|
+
|
32
|
+
Log entries are output as _JSON_. For example:
|
33
|
+
|
34
|
+
```json
|
35
|
+
{"active":5,"queued":2,"source":"rain_catcher","application":"myapp","environment":"production"}
|
36
|
+
```
|
data/lib/rain_catcher/railtie.rb
CHANGED
@@ -22,7 +22,11 @@ module RainCatcher
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def queue_data
|
25
|
-
Raindrops::ListenStats.new(0, 0).to_h.merge(
|
25
|
+
Raindrops::ListenStats.new(0, 0).to_h.merge(
|
26
|
+
source: 'rain_catcher',
|
27
|
+
application: application_name,
|
28
|
+
environment: Rails.env.to_s
|
29
|
+
)
|
26
30
|
end
|
27
31
|
|
28
32
|
def elapsed?
|
@@ -39,5 +43,12 @@ module RainCatcher
|
|
39
43
|
def level
|
40
44
|
@level ||= ENV.fetch('RAIN_CATCHER_LOG_LEVEL', 'INFO').downcase.to_sym
|
41
45
|
end
|
46
|
+
|
47
|
+
def application_name
|
48
|
+
@application_name ||= ENV.fetch(
|
49
|
+
'RAIN_CATCHER_APPLICATION_NAME',
|
50
|
+
Rails.application.class.name.split('::').first.downcase
|
51
|
+
)
|
52
|
+
end
|
42
53
|
end
|
43
54
|
end
|
data/lib/rain_catcher/version.rb
CHANGED
Binary file
|
data/rain_catcher.gemspec
CHANGED
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
27
27
|
spec.add_development_dependency 'rake', '~> 10.0'
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
29
|
-
spec.add_development_dependency 'rubocop'
|
30
|
-
spec.add_development_dependency 'strong_versions'
|
29
|
+
spec.add_development_dependency 'rubocop', '~> 0.69.0'
|
30
|
+
spec.add_development_dependency 'strong_versions', '~> 0.3.2'
|
31
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rain_catcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
@@ -56,30 +56,30 @@ dependencies:
|
|
56
56
|
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.69.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.69.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: strong_versions
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.3.2
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.3.2
|
83
83
|
description: Rails application statistic logging with Raindrops
|
84
84
|
email:
|
85
85
|
- robertanthonyfarrell@gmail.com
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/rain_catcher.rb
|
99
99
|
- lib/rain_catcher/railtie.rb
|
100
100
|
- lib/rain_catcher/version.rb
|
101
|
+
- rain_catcher-0.1.0.gem
|
101
102
|
- rain_catcher.gemspec
|
102
103
|
homepage: https://github.com/bobf/rain_catcher
|
103
104
|
licenses: []
|