1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

Allow to add error details with Logger#add_error

This commit is contained in:
Holger Just 2017-12-05 18:59:21 +01:00
parent 26597680af
commit 8cdd000b0c
2 changed files with 5 additions and 0 deletions

View File

@ -364,6 +364,7 @@ module Rackstash
def add_exception(exception, force: true)
buffer.add_exception(exception, force: force)
end
alias add_error add_exception
# Create a new {Buffer} and put it on the {BufferStack} for the current
# Thread. Until it is poped again with {#pop_buffer}, all newly logged

View File

@ -483,6 +483,10 @@ describe Rackstash::Logger do
expect(Rackstash::Buffer.instance_method(:add_exception).parameters)
.to eql logger.method(:add_exception).parameters
end
it 'can be called as #add_error' do
expect(logger.method(:add_error)).to eql logger.method(:add_exception)
end
end
describe '#push_buffer' do