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:
parent
26597680af
commit
8cdd000b0c
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user