lib/filum.rb in filum-0.0.1 vs lib/filum.rb in filum-0.0.2

- old
+ new

@@ -30,10 +30,16 @@ # Logger. Log in the following way: # # Filum.logger.info "Log this" # def self.logger - @logger ||= Filum::Logger.new(Filum.config.logfile) + logfile = Filum.config.logfile + dir = File.dirname(logfile) + unless File.directory?(dir) + FileUtils.mkdir_p(dir) + end + + @logger ||= Filum::Logger.new(logfile) @logger.level = Logger::INFO @logger end end