mirror of
https://github.com/meineerde/rackstash.git
synced 2025-10-17 14:01:01 +00:00
Remove unused RawFormatter
This commit is contained in:
parent
1249b6ac47
commit
bb78d98639
@ -27,10 +27,4 @@ module Rackstash
|
||||
"#{msg2str(msg)}\n".freeze
|
||||
end
|
||||
end
|
||||
|
||||
class RawFormatter
|
||||
def call(_severity, _timestamp, _progname, msg)
|
||||
msg.is_a?(String) ? msg : msg.inspect
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -58,19 +58,3 @@ RSpec.describe Rackstash::Formatter do
|
||||
.and be_frozen
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.describe Rackstash::RawFormatter do
|
||||
let(:formatter) { described_class.new }
|
||||
|
||||
it 'returns the message' do
|
||||
msg = 'my message'
|
||||
expect(formatter.call('ERROR', Time.now, 'progname', msg)).to equal msg
|
||||
end
|
||||
|
||||
it 'inspects non-string messages' do
|
||||
obj = Object.new
|
||||
|
||||
expect(obj).to receive(:inspect).and_return('object')
|
||||
expect(formatter.call('ERROR', Time.now, 'progname', obj)).to eql 'object'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user