Sha256: 0b83f0f17aadb2066419b76a1d3bc8cb77dc918b8f11ddf52b20adf1eaaf7031
Contents?: true
Size: 842 Bytes
Versions: 8
Compression:
Stored size: 842 Bytes
Contents
require 'spec_helper' describe Killbill::Plugin::KillbillLogger do it 'should support Logger APIs' do logger = Killbill::Plugin::KillbillLogger.new(::Logger.new(STDOUT)) logger.fatal { "Argument 'foo' not given." } logger.error "Argument #{@foo} mismatch." logger.info('initialize') { 'Initializing...' } logger.add(Logger::FATAL) { 'Fatal error!' } logger.close end it 'only executes block when at given level' do logger = Killbill::Plugin::KillbillLogger.new(::Logger.new(STDOUT)) logger.log_level = ::Logger::INFO logger.info { 'logging at INFO level' } logger.debug { raise 'logging at DEBUG level' } # should not raise logger.add(Logger::WARN) { 'logging at WARN level' } logger.add(Logger::DEBUG) { raise 'logging at DEBUG level' } # should not raise logger.close end end
Version data entries
8 entries across 8 versions & 1 rubygems