mirror of
https://github.com/meineerde/rackstash.git
synced 2025-10-17 14:01:01 +00:00
Add Rack::Errors#close to satisfy the expected protocol for a logdev of Ruby's core Logger
This commit is contained in:
parent
78f3e037e7
commit
b646ef9ef1
@ -30,6 +30,12 @@ module Rackstash
|
||||
@logger = logger
|
||||
end
|
||||
|
||||
# Close the {logger} and all of its adapters
|
||||
# @return [void]
|
||||
def close
|
||||
@logger.close
|
||||
end
|
||||
|
||||
# Log a formatted error message to the current buffer of the `logger`. We
|
||||
# will format the given message and log it with an `UNKNOWN` severity to
|
||||
# the current buffer. Usually, the logger's formatter adds a trailing
|
||||
|
||||
@ -53,4 +53,11 @@ RSpec.describe Rackstash::Rack::Errors do
|
||||
errors.flush
|
||||
end
|
||||
end
|
||||
|
||||
describe '#close' do
|
||||
it 'closes the logger' do
|
||||
expect(logger).to receive(:close)
|
||||
errors.close
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user