From 4508cfa6288ecfaf673ba45f10739798dbfe7b34 Mon Sep 17 00:00:00 2001 From: Danilo Sousa Date: Wed, 20 Jul 2016 11:32:18 -0300 Subject: create a `logs` dir for all the debug logs --- lib/oxidized.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/oxidized.rb') 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') -- cgit v1.2.1