Sha256: 4ad6880e7d4530d3b15b6a6922262c7701b05f35263f9194ff9d41af5b921e8a

Contents?: true

Size: 415 Bytes

Versions: 20

Compression:

Stored size: 415 Bytes

Contents

require 'logger'

module RIM

class FileLogger < Logger

  def initialize(name, file)
    super(name)
    FileUtils.mkdir_p(File.dirname(file))
    @file_logger = Logger.new(file)
    @file_logger.level = Logger::DEBUG
  end

  def add(severity, message = nil, progname = nil, &block)
    @file_logger.add(severity, message, progname)
    super(severity, message, progname)    
  end

end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
esr-rim-1.4.8 lib/rim/file_logger.rb
esr-rim-1.4.7 lib/rim/file_logger.rb
esr-rim-1.4.4 lib/rim/file_logger.rb
esr-rim-1.4.3 lib/rim/file_logger.rb
esr-rim-1.4.2 lib/rim/file_logger.rb
esr-rim-1.4.0 lib/rim/file_logger.rb
esr-rim-1.3.9 lib/rim/file_logger.rb
esr-rim-1.3.8 lib/rim/file_logger.rb
esr-rim-1.3.7 lib/rim/file_logger.rb
esr-rim-1.3.6 lib/rim/file_logger.rb
esr-rim-1.3.5 lib/rim/file_logger.rb
esr-rim-1.3.4 lib/rim/file_logger.rb
esr-rim-1.3.3 lib/rim/file_logger.rb
esr-rim-1.3.2 lib/rim/file_logger.rb
esr-rim-1.3.1 lib/rim/file_logger.rb
esr-rim-1.3.0 lib/rim/file_logger.rb
esr-rim-1.2.2 lib/rim/file_logger.rb
esr-rim-1.2.1 lib/rim/file_logger.rb
esr-rim-1.2.0 lib/rim/file_logger.rb
esr-rim-1.1.5 lib/rim/file_logger.rb