akita-har_logger 0.2.13 → 0.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/akita/har_logger.rb +1 -11
- data/lib/akita/har_logger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9eed2465cdafed5eb9d0af31022054193efdcd6ba8b2866a466c51554e24ab43
|
4
|
+
data.tar.gz: 4553cd54a99c9d1a2958657e90b31deeb40e237d508bbd1b80c9cbc59064ef64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04ff7a6f33614994d7bc82d4fb52b5b3957be1f405df36316330dd811d7949968325eaf997276d775e85f1df17461c4733cebdae9eeef6fb0bd4be53f309cdb0
|
7
|
+
data.tar.gz: f0325184bc764d7eba84573d164bed1c676300cfac8f27b63dafea6f0ebafe80dd58cacc965c694830355c603a7a23b6c2435b3a1b92c22be89093c06869cc0e
|
data/Gemfile.lock
CHANGED
data/lib/akita/har_logger.rb
CHANGED
@@ -55,9 +55,6 @@ module Akita
|
|
55
55
|
saved_input = env['rack.input']
|
56
56
|
env['rack.input'] = StringIO.new request_body
|
57
57
|
|
58
|
-
# Buffer the response body in case it's not a rewindable stream.
|
59
|
-
body = HarLogger.bufferBody(body)
|
60
|
-
|
61
58
|
@entry_queue << (HarEntry.new start_time, wait_time_ms, env, status,
|
62
59
|
headers, body)
|
63
60
|
|
@@ -74,19 +71,12 @@ module Akita
|
|
74
71
|
# Logs the given exception.
|
75
72
|
def self.logException(context, e)
|
76
73
|
Rails.logger.debug "AKITA: Exception while #{context}: #{e.message} "\
|
77
|
-
"(#{e.class.name})"
|
74
|
+
"(#{e.class.name}) in thread #{Thread.current}"
|
78
75
|
e.backtrace.each { |frame|
|
79
76
|
Rails.logger.debug "AKITA: #{frame}"
|
80
77
|
}
|
81
78
|
end
|
82
79
|
|
83
|
-
# Reads the given body into an array and returns the result.
|
84
|
-
def self.bufferBody(body)
|
85
|
-
result = []
|
86
|
-
body.each { |part| result << part }
|
87
|
-
result
|
88
|
-
end
|
89
|
-
|
90
80
|
# Logging filter for `ActionController`s.
|
91
81
|
# TODO: Some amount of code duplication here. Should refactor.
|
92
82
|
class Filter
|