diff options
author | Elvin Efendi <elvin.efendiev@shopify.com> | 2015-12-03 10:28:46 -0500 |
---|---|---|
committer | Elvin Efendi <elvin.efendiev@shopify.com> | 2015-12-03 10:28:46 -0500 |
commit | 98a9d26be543e49ea21586c7b48e49387b8e0c09 (patch) | |
tree | d40c9860adf1a8cf9cce34e20b5b9826e48c4f1e /lib/oxidized | |
parent | c6614b7a343fe1bd7eabd5e0a8ae404440087bc7 (diff) |
do not do syslog
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 |