diff options
Diffstat (limited to 'lib/oxidized')
-rw-r--r-- | lib/oxidized/log.rb | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/lib/oxidized/log.rb b/lib/oxidized/log.rb index e9ae1b4..04a2d65 100644 --- a/lib/oxidized/log.rb +++ b/lib/oxidized/log.rb @@ -1,22 +1,15 @@ module Oxidized + require 'logger' - 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 + class Logger < Logger + def initialize target=STDOUT + super target + end + def file= target + FileUtils.mkdir_p File.dirname(target) + @logdev = LogDevice.new target end - Log = Logger.new end + Log = Logger.new end |