low 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/low/middleware/request_logger.rb +5 -5
- data/lib/low/version.rb +1 -1
- metadata +1 -1
@@ -44,18 +44,18 @@ module Low
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def call(env)
|
47
|
-
# Set the 'rack.errors' environment key to the above `
|
47
|
+
# Set the 'rack.errors' environment key to the above `RequestLogger.io`
|
48
48
|
# (other rack components, such as Sinatra, use this),
|
49
|
-
env['rack.errors'] =
|
49
|
+
env['rack.errors'] = RequestLogger.io
|
50
50
|
|
51
51
|
# instantiate a new `Useless::Logger`,
|
52
|
-
logger =
|
52
|
+
logger = Low::ScopedLogger.new(env['rack.errors'])
|
53
53
|
|
54
54
|
# set the logger level to the above `Logger.level`,
|
55
|
-
logger.level =
|
55
|
+
logger.level = RequestLogger.level
|
56
56
|
|
57
57
|
# set the request_id if one is available
|
58
|
-
logger.
|
58
|
+
logger.scope = env['request_id']
|
59
59
|
|
60
60
|
# add it to the env,
|
61
61
|
env[@key] = logger
|
data/lib/low/version.rb
CHANGED