diff options
author | Elvin Efendi <elvin.efendiyev@gmail.com> | 2015-12-03 10:39:30 -0500 |
---|---|---|
committer | Elvin Efendi <elvin.efendiyev@gmail.com> | 2015-12-03 10:39:30 -0500 |
commit | 84697f6440d156e264962cf74b61c8ef90ed187c (patch) | |
tree | d40c9860adf1a8cf9cce34e20b5b9826e48c4f1e /lib | |
parent | c6614b7a343fe1bd7eabd5e0a8ae404440087bc7 (diff) | |
parent | 98a9d26be543e49ea21586c7b48e49387b8e0c09 (diff) |
Merge pull request #4 from Shopify/better-logging
do not do syslog
Diffstat (limited to 'lib')
-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 |