httplog 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +1 -1
- data/lib/httplog/http_log.rb +6 -1
- data/lib/httplog/version.rb +1 -1
- metadata +78 -61
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 26d68ccbe75956716551dd1c429ebec57d1930fe
|
4
|
+
data.tar.gz: 365d302175b5c0c7470d8ec25184791aafe0efb7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ddee93a1e7282327c9efe1273c3c7b603d5691e49743b5214b8fd430f3564469a946a04a845dea6ee27f4b22a104f583421d6c8def81ac77227c00f739f85a65
|
7
|
+
data.tar.gz: 300a45a60aa947acc95b9cd9dbec6affe40467f8e49efad0a56d486738d03d9ce3fcd15997d7144efc3b8855c8844157e61a88a6970c03a77cc5958dbf119d65
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
## httplog
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/httplog.png)](http://badge.fury.io/rb/httplog)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/httplog.png)](http://badge.fury.io/rb/httplog) [![Build Status](https://travis-ci.org/trusche/httplog.svg?branch=master)](https://travis-ci.org/trusche/httplog) [![Code Climate](https://codeclimate.com/github/trusche/httplog.png)](https://codeclimate.com/github/trusche/httplog)
|
4
4
|
|
5
5
|
Log outgoing HTTP requests made from your application.
|
6
6
|
See the [blog post](http://trusche.github.com/blog/2011/09/29/logging-outgoing-http-requests/)
|
data/lib/httplog/http_log.rb
CHANGED
@@ -39,7 +39,12 @@ module HttpLog
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def log(msg)
|
42
|
-
|
42
|
+
# This builds a hash {0=>:DEBUG, 1=>:INFO, 2=>:WARN, 3=>:ERROR, 4=>:FATAL, 5=>:UNKNOWN}.
|
43
|
+
# Courtesy of the delayed_job gem in this commit:
|
44
|
+
# https://github.com/collectiveidea/delayed_job/commit/e7f5aa1ed806e61251bdb77daf25864eeb3aff59
|
45
|
+
severities = Hash[*Logger::Severity.constants.enum_for(:each_with_index).collect{ |s, i| [i, s] }.flatten]
|
46
|
+
severity = severities[options[:severity]].to_s.downcase
|
47
|
+
options[:logger].send(severity, LOG_PREFIX + msg)
|
43
48
|
end
|
44
49
|
|
45
50
|
def log_connection(host, port = nil)
|
data/lib/httplog/version.rb
CHANGED
metadata
CHANGED
@@ -1,200 +1,223 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httplog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.7
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Thilo Rusche
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-07-31 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: guard-rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
28
39
|
- !ruby/object:Gem::Version
|
29
40
|
version: '0'
|
30
41
|
- !ruby/object:Gem::Dependency
|
31
42
|
name: rack
|
32
43
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
44
|
requirements:
|
35
|
-
- -
|
45
|
+
- - '>='
|
36
46
|
- !ruby/object:Gem::Version
|
37
47
|
version: '0'
|
38
48
|
type: :development
|
39
49
|
prerelease: false
|
40
50
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
51
|
requirements:
|
43
|
-
- -
|
52
|
+
- - '>='
|
44
53
|
- !ruby/object:Gem::Version
|
45
54
|
version: '0'
|
46
55
|
- !ruby/object:Gem::Dependency
|
47
56
|
name: thin
|
48
57
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
58
|
requirements:
|
51
|
-
- -
|
59
|
+
- - '>='
|
52
60
|
- !ruby/object:Gem::Version
|
53
61
|
version: '0'
|
54
62
|
type: :development
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
65
|
requirements:
|
59
|
-
- -
|
66
|
+
- - '>='
|
60
67
|
- !ruby/object:Gem::Version
|
61
68
|
version: '0'
|
62
69
|
- !ruby/object:Gem::Dependency
|
63
70
|
name: httpclient
|
64
71
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
72
|
requirements:
|
67
|
-
- -
|
73
|
+
- - '>='
|
68
74
|
- !ruby/object:Gem::Version
|
69
75
|
version: '0'
|
70
76
|
type: :development
|
71
77
|
prerelease: false
|
72
78
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
79
|
requirements:
|
75
|
-
- -
|
80
|
+
- - '>='
|
76
81
|
- !ruby/object:Gem::Version
|
77
82
|
version: '0'
|
78
83
|
- !ruby/object:Gem::Dependency
|
79
84
|
name: httparty
|
80
85
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
86
|
requirements:
|
83
|
-
- -
|
87
|
+
- - '>='
|
84
88
|
- !ruby/object:Gem::Version
|
85
89
|
version: '0'
|
86
90
|
type: :development
|
87
91
|
prerelease: false
|
88
92
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
93
|
requirements:
|
91
|
-
- -
|
94
|
+
- - '>='
|
92
95
|
- !ruby/object:Gem::Version
|
93
96
|
version: '0'
|
94
97
|
- !ruby/object:Gem::Dependency
|
95
98
|
name: faraday
|
96
99
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
100
|
requirements:
|
99
|
-
- -
|
101
|
+
- - '>='
|
100
102
|
- !ruby/object:Gem::Version
|
101
103
|
version: '0'
|
102
104
|
type: :development
|
103
105
|
prerelease: false
|
104
106
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
107
|
requirements:
|
107
|
-
- -
|
108
|
+
- - '>='
|
108
109
|
- !ruby/object:Gem::Version
|
109
110
|
version: '0'
|
110
111
|
- !ruby/object:Gem::Dependency
|
111
112
|
name: excon
|
112
113
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 0.18.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
121
|
requirements:
|
123
|
-
- -
|
122
|
+
- - '>='
|
124
123
|
- !ruby/object:Gem::Version
|
125
124
|
version: 0.18.0
|
126
125
|
- !ruby/object:Gem::Dependency
|
127
126
|
name: typhoeus
|
128
127
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
128
|
requirements:
|
131
|
-
- -
|
129
|
+
- - '>='
|
132
130
|
- !ruby/object:Gem::Version
|
133
131
|
version: '0'
|
134
132
|
type: :development
|
135
133
|
prerelease: false
|
136
134
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
135
|
requirements:
|
139
|
-
- -
|
136
|
+
- - '>='
|
140
137
|
- !ruby/object:Gem::Version
|
141
138
|
version: '0'
|
142
139
|
- !ruby/object:Gem::Dependency
|
143
140
|
name: ethon
|
144
141
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
142
|
requirements:
|
147
|
-
- -
|
143
|
+
- - '>='
|
148
144
|
- !ruby/object:Gem::Version
|
149
145
|
version: '0'
|
150
146
|
type: :development
|
151
147
|
prerelease: false
|
152
148
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
149
|
requirements:
|
155
|
-
- -
|
150
|
+
- - '>='
|
156
151
|
- !ruby/object:Gem::Version
|
157
152
|
version: '0'
|
158
153
|
- !ruby/object:Gem::Dependency
|
159
154
|
name: patron
|
160
155
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
156
|
requirements:
|
163
|
-
- -
|
157
|
+
- - '>='
|
164
158
|
- !ruby/object:Gem::Version
|
165
159
|
version: '0'
|
166
160
|
type: :development
|
167
161
|
prerelease: false
|
168
162
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
163
|
requirements:
|
171
|
-
- -
|
164
|
+
- - '>='
|
172
165
|
- !ruby/object:Gem::Version
|
173
166
|
version: '0'
|
174
167
|
- !ruby/object:Gem::Dependency
|
175
168
|
name: simplecov
|
176
169
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
170
|
requirements:
|
179
|
-
- -
|
171
|
+
- - '>='
|
180
172
|
- !ruby/object:Gem::Version
|
181
173
|
version: '0'
|
182
174
|
type: :development
|
183
175
|
prerelease: false
|
184
176
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
177
|
requirements:
|
187
|
-
- -
|
178
|
+
- - '>='
|
188
179
|
- !ruby/object:Gem::Version
|
189
180
|
version: '0'
|
190
|
-
|
191
|
-
|
192
|
-
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: log4r
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - '>='
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - '>='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rake
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - '>='
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - '>='
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
description: |-
|
210
|
+
Log outgoing HTTP requests made from your application. Helpful for tracking API calls
|
211
|
+
of third party gems that don't provide their own log output.
|
193
212
|
email: thilorusche@gmail.com
|
194
213
|
executables: []
|
195
214
|
extensions: []
|
196
215
|
extra_rdoc_files: []
|
197
216
|
files:
|
217
|
+
- MIT-LICENSE
|
218
|
+
- README.md
|
219
|
+
- Rakefile
|
220
|
+
- lib/httplog.rb
|
198
221
|
- lib/httplog/adapters/ethon.rb
|
199
222
|
- lib/httplog/adapters/excon.rb
|
200
223
|
- lib/httplog/adapters/httpclient.rb
|
@@ -202,33 +225,27 @@ files:
|
|
202
225
|
- lib/httplog/adapters/patron.rb
|
203
226
|
- lib/httplog/http_log.rb
|
204
227
|
- lib/httplog/version.rb
|
205
|
-
- lib/httplog.rb
|
206
|
-
- MIT-LICENSE
|
207
|
-
- Rakefile
|
208
|
-
- README.md
|
209
228
|
homepage: http://github.com/trusche/httplog
|
210
229
|
licenses: []
|
230
|
+
metadata: {}
|
211
231
|
post_install_message:
|
212
232
|
rdoc_options: []
|
213
233
|
require_paths:
|
214
234
|
- lib
|
215
235
|
required_ruby_version: !ruby/object:Gem::Requirement
|
216
|
-
none: false
|
217
236
|
requirements:
|
218
|
-
- -
|
237
|
+
- - '>='
|
219
238
|
- !ruby/object:Gem::Version
|
220
239
|
version: '0'
|
221
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
|
-
none: false
|
223
241
|
requirements:
|
224
|
-
- -
|
242
|
+
- - '>='
|
225
243
|
- !ruby/object:Gem::Version
|
226
244
|
version: '0'
|
227
245
|
requirements: []
|
228
246
|
rubyforge_project:
|
229
|
-
rubygems_version:
|
247
|
+
rubygems_version: 2.2.2
|
230
248
|
signing_key:
|
231
|
-
specification_version:
|
249
|
+
specification_version: 4
|
232
250
|
summary: Logs outgoing HTTP requests.
|
233
251
|
test_files: []
|
234
|
-
has_rdoc:
|