Class: RubyApp::Log
- Inherits:
-
Logger
- Object
- Logger
- RubyApp::Log
- Extended by:
- Mixins::DelegateMixin
- Defined in:
- lib/ruby_app/log.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Mixins::DelegateMixin
Class Method Details
.close! ⇒ Object
32 33 34 35 |
# File 'lib/ruby_app/log.rb', line 32 def self.close! @@_log.close if @@_log @@_log = nil end |
.get ⇒ Object
20 21 22 |
# File 'lib/ruby_app/log.rb', line 20 def self.get @@_log end |
.open! ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/ruby_app/log.rb', line 24 def self.open! path = RubyApp::Application..log_path directory = File.dirname(path) Dir.mkdir(directory) unless File.exists?(directory) @@_log = RubyApp::Log.new(path) @@_log.debug("#{self}##{__method__} path=#{path.inspect}") end |
Instance Method Details
#exception(exception) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/ruby_app/log.rb', line 10 def exception(exception) self.error('-' * 80) self.error("exception=#{exception.class.inspect} #{exception.}") self.error('-' * 80) exception.backtrace.each do |line| self.error(line) end self.error('-' * 80) end |