From 98a9d26be543e49ea21586c7b48e49387b8e0c09 Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Thu, 3 Dec 2015 10:28:46 -0500 Subject: do not do syslog --- lib/oxidized/log.rb | 25 +++++++++---------------- 1 file 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 -- cgit v1.2.1