From b9db9a117daf3f1870e05906b9b05902d1f9b22e Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sat, 16 Aug 2014 11:50:04 +0300 Subject: Closes #37 --- lib/oxidized/config.rb | 2 +- lib/oxidized/log.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/oxidized/config.rb b/lib/oxidized/config.rb index ddfde81..96c8fbf 100644 --- a/lib/oxidized/config.rb +++ b/lib/oxidized/config.rb @@ -51,6 +51,6 @@ module Oxidized Log.level = Logger::INFO unless CFG.debug raise NoConfig, 'edit ~/.config/oxidized/config' if CFGS.create - Log.file = CFG.log if CFG.log + Log.file = CFG.log if CFG.log end diff --git a/lib/oxidized/log.rb b/lib/oxidized/log.rb index 9e77646..e9ae1b4 100644 --- a/lib/oxidized/log.rb +++ b/lib/oxidized/log.rb @@ -12,6 +12,7 @@ module Oxidized super target end def file= target + FileUtils.mkdir_p File.dirname(target) @logdev = LogDevice.new target end end -- cgit v1.2.1