summaryrefslogtreecommitdiff
path: root/lib/oxidized/log.rb
blob: 04a2d652f929d3ae4c7d858ace039acba3ebbf0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Oxidized
  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