Sha256: dc2bc5929e33d6166ee7f488c73aea61d9549e6e7baccf17c75636372d02f11c

Contents?: true

Size: 459 Bytes

Versions: 12

Compression:

Stored size: 459 Bytes

Contents

module Oxidized

  begin
    require 'syslog/logger'
    Log = Syslog::Logger.new 'oxidized'
    Log.define_singleton_method(:file=){|arg|}
  rescue LoadError
    # 1.9.3 has no love for syslog
    require 'logger'
    class Logger < Logger
     def initialize target=STDOUT
       super target
     end
     def file= target
       FileUtils.mkdir_p File.dirname(target)
       @logdev = LogDevice.new target
     end
    end
    Log = Logger.new
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
oxidized-0.9.0 lib/oxidized/log.rb
oxidized-0.8.1 lib/oxidized/log.rb
oxidized-0.8.0 lib/oxidized/log.rb
oxidized-0.7.2 lib/oxidized/log.rb
oxidized-0.7.1 lib/oxidized/log.rb
oxidized-0.7.0 lib/oxidized/log.rb
oxidized-0.6.0 lib/oxidized/log.rb
oxidized-0.5.0 lib/oxidized/log.rb
oxidized-0.4.1 lib/oxidized/log.rb
oxidized-0.4.0 lib/oxidized/log.rb
oxidized-0.3.0 lib/oxidized/log.rb
oxidized-0.2.4 lib/oxidized/log.rb