lib/vedeu/support/log.rb in vedeu-0.1.17 vs lib/vedeu/support/log.rb in vedeu-0.1.18

- old
+ new

@@ -74,30 +74,36 @@ end end class Log - # @return [] + # @return [TrueClass] def self.logger @logger ||= MonoLogger.new(filename).tap do |log| log.formatter = proc do |_, time, _, message| time.utc.iso8601 + ": " + message + "\n" end end end private + # @api private + # @return [String] def self.filename @_filename ||= directory + '/vedeu.log' end + # @api private + # @return [String] def self.directory FileUtils.mkdir_p(path) unless File.directory?(path) path end + # @api private + # @return [String] def self.path Dir.home + '/.vedeu' end end