diff options
Diffstat (limited to 'lib/oxidized.rb')
-rw-r--r-- | lib/oxidized.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/oxidized.rb b/lib/oxidized.rb index dfd9679..ce48f10 100644 --- a/lib/oxidized.rb +++ b/lib/oxidized.rb @@ -1,3 +1,5 @@ +require 'fileutils' + module Oxidized class OxidizedError < StandardError; end @@ -34,13 +36,14 @@ module Oxidized end def self.setup_logger + FileUtils.mkdir_p(Config::Log) unless File.directory?(Config::Log) self.logger = if config.has_key?('use_syslog') && config.use_syslog require 'syslog/logger' Syslog::Logger.new('oxidized') else require 'logger' if config.has_key?('log') - Logger.new(config.log) + Logger.new(File.expand_path(config.log)) else Logger.new(STDERR) end |