summaryrefslogtreecommitdiff
path: root/lib/oxidized.rb
diff options
context:
space:
mode:
authorDanilo Sousa <dsgoncalves@uoldiveo.com>2016-07-20 11:32:18 -0300
committerDanilo Sousa <dsgoncalves@uoldiveo.com>2016-07-20 11:35:06 -0300
commit4508cfa6288ecfaf673ba45f10739798dbfe7b34 (patch)
tree9f95b2395b83c4ff5d2b711d0ff179e331ceb74a /lib/oxidized.rb
parent63b1bd788e0807f935e0a69c0e3589f9c041206c (diff)
create a `logs` dir for all the debug logs
Diffstat (limited to 'lib/oxidized.rb')
-rw-r--r--lib/oxidized.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/oxidized.rb b/lib/oxidized.rb
index dfd9679..f40daf9 100644
--- a/lib/oxidized.rb
+++ b/lib/oxidized.rb
@@ -1,3 +1,5 @@
+require 'fileutils'
+
module Oxidized
class OxidizedError < StandardError; end
@@ -34,6 +36,7 @@ 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')