test/appender/file_test.rb in semantic_logger-4.1.1 vs test/appender/file_test.rb in semantic_logger-4.2.0
- old
+ new
@@ -5,17 +5,18 @@
#
module Appender
class FileTest < Minitest::Test
describe SemanticLogger::Appender::File do
before do
- SemanticLogger.default_level = :trace
- @time = Time.new
- @io = StringIO.new
- @appender = SemanticLogger::Appender::File.new(io: @io)
- @hash = {session_id: 'HSSKLEU@JDK767', tracking_number: 12345}
- @hash_str = @hash.inspect.sub("{", "\\{").sub("}", "\\}")
- @thread_name = Thread.current.name
- @file_name_reg_exp = RUBY_VERSION.to_f <= 2.0 ? ' (mock|file_test).rb:\d+' : ' file_test.rb:\d+'
+ SemanticLogger.default_level = :trace
+ SemanticLogger.backtrace_level = :error
+ @time = Time.new
+ @io = StringIO.new
+ @appender = SemanticLogger::Appender::File.new(io: @io)
+ @hash = {session_id: 'HSSKLEU@JDK767', tracking_number: 12345}
+ @hash_str = @hash.inspect.sub("{", "\\{").sub("}", "\\}")
+ @thread_name = Thread.current.name
+ @file_name_reg_exp = RUBY_VERSION.to_f <= 2.0 ? ' (mock|file_test).rb:\d+' : ' file_test.rb:\d+'
end
describe 'format logs into text form' do
it 'handle no message or payload' do
@appender.debug