Sha256: ef964f70702fca9167d07542fbe83461529110e56489f116cf2df5d758a6bf96

Contents?: true

Size: 708 Bytes

Versions: 6

Compression:

Stored size: 708 Bytes

Contents

require 'pathname'
require Pathname(__FILE__).dirname.expand_path + 'logger_helper'

Object.class_eval do
  remove_const :Slf4r
end

basedir = Pathname(__FILE__).dirname.parent.expand_path
load basedir + 'lib' + 'slf4r' + 'abstract_logger_facade.rb'
load basedir + 'lib' + 'slf4r' + 'log4r_logger.rb'
require 'slf4r/log4r_logger'

Log4r::Logger.root.level = Log4r::DEBUG

out = Log4r::FileOutputter.new('logfile',
                               :filename => (basedir + 'tmp' + 'log4r.txt').to_s,
                               :trunc=>false,
                               :level => Log4r::DEBUG)
logger =  Log4r::Logger.new("log4r")
logger.add('logfile')

behave_as_logger(Slf4r::LoggerFacade.new('log4r'))

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
slf4r-0.4.2 spec/log4r_logger_spec.rb
slf4r-0.4.1 spec/log4r_logger_spec.rb
slf4r-0.4.0 spec/log4r_logger_spec.rb
slf4r-0.3.3 spec/log4r_logger_spec.rb
slf4r-0.3.2 spec/log4r_logger_spec.rb
slf4r-0.3.1 spec/log4r_logger_spec.rb