7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/volt/server/rack/quiet_common_logger.rb', line 7
def call(env)
path = env['PATH_INFO']
began_at = Time.now
status, , body = @app.call(env)
= Utils::HeaderHash.new()
base = ::File.basename(path)
if base.index('.')
ext = base.split('.').last
else
ext = nil
end
@logged = false
body = BodyProxy.new(body) do
if !@@ignore_extensions.include?(ext) &&
!path.start_with?('/__OPAL_SOURCE_MAPS__/') &&
!@logged
log(env, status, , began_at)
end
end
unless ext || path.start_with?('/channel')
@logged = true
log(env, status, , began_at)
end
[status, , body]
end
|