rack-ougai 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack/ougai/log_requests.rb +3 -2
- data/lib/rack/ougai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32569974618926a8e710c12db76128de7e637a87c5c3db9e336250b3d97b4827
|
4
|
+
data.tar.gz: 2b873a2507f65c3912483d3533321559a381c2fe08b6c542180af62bd0a778a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e5eb9e23f07498a76024a25dbabedec3410cb07cb2632521e53df368ef18cb65509b62f56f3f45337703c32b36144af5e40b42c47c9fd700fe9a51a19ed2b1e
|
7
|
+
data.tar.gz: 0c5403cd1971d3ddcc70580f7e54e072b319ee3f8cd4ac28768a1ca4e001afc9dd3a9acc6e6fc3a0de909617a9c7fe01d201295ec5257271dcb4b2479def7ff6
|
@@ -3,9 +3,10 @@ require 'time'
|
|
3
3
|
module Rack
|
4
4
|
module Ougai
|
5
5
|
class LogRequests
|
6
|
-
def initialize(app, logger = nil)
|
6
|
+
def initialize(app, logger = nil, local: false)
|
7
7
|
@app = app
|
8
8
|
@logger = logger
|
9
|
+
@local = local
|
9
10
|
end
|
10
11
|
|
11
12
|
def call(env)
|
@@ -22,7 +23,7 @@ module Rack
|
|
22
23
|
end_time = Time.now
|
23
24
|
|
24
25
|
ret = {
|
25
|
-
time: start_time,
|
26
|
+
time: @local ? start_time : start_time.utc,
|
26
27
|
usec: end_time.usec - start_time.usec,
|
27
28
|
remote_addr: env['HTTP_X_FORWARDED_FOR'] || env["REMOTE_ADDR"],
|
28
29
|
method: env[REQUEST_METHOD],
|
data/lib/rack/ougai/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-ougai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toshimitsu Takahashi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-01-
|
12
|
+
date: 2018-01-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|