Class: Vedeu::Log
- Inherits:
-
Object
- Object
- Vedeu::Log
- Defined in:
- lib/vedeu/support/log.rb
Class Method Summary collapse
- .directory ⇒ String private private
- .filename ⇒ String private private
- .logger ⇒ TrueClass
- .path ⇒ String private private
Class Method Details
.directory ⇒ String (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
98 99 100 101 102 |
# File 'lib/vedeu/support/log.rb', line 98 def self.directory FileUtils.mkdir_p(path) unless File.directory?(path) path end |
.filename ⇒ String (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
92 93 94 |
# File 'lib/vedeu/support/log.rb', line 92 def self.filename @_filename ||= directory + '/vedeu.log' end |
.logger ⇒ TrueClass
80 81 82 83 84 85 86 |
# File 'lib/vedeu/support/log.rb', line 80 def self.logger @logger ||= MonoLogger.new(filename).tap do |log| log.formatter = proc do |_, time, _, | time.utc.iso8601 + ": " + + "\n" end end end |
.path ⇒ String (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
106 107 108 |
# File 'lib/vedeu/support/log.rb', line 106 def self.path Dir.home + '/.vedeu' end |