Class: Mutx::Support::Log
- Inherits:
-
Object
- Object
- Mutx::Support::Log
- Defined in:
- lib/mutx/support/log.rb
Class Method Summary collapse
- .debug(output) ⇒ Object
- .error(output) ⇒ Object
- .exist? ⇒ Boolean
- .info(output) ⇒ Object
- .start ⇒ Object
Class Method Details
.debug(output) ⇒ Object
9 10 11 |
# File 'lib/mutx/support/log.rb', line 9 def self.debug output @@logger.debug output if self.exist? end |
.error(output) ⇒ Object
17 18 19 |
# File 'lib/mutx/support/log.rb', line 17 def self.error output @@logger.error output if self.exist? end |
.exist? ⇒ Boolean
21 22 23 |
# File 'lib/mutx/support/log.rb', line 21 def self.exist? Dir.exist? "#{Dir.pwd}/mutx/logs/" end |
.info(output) ⇒ Object
13 14 15 |
# File 'lib/mutx/support/log.rb', line 13 def self.info output @@logger.info output if self.exist? end |
.start ⇒ Object
5 6 7 |
# File 'lib/mutx/support/log.rb', line 5 def self.start @@logger ||= Logger.new("#{Dir.pwd}/mutx/logs/mutx.log",1,1024*1024) if self.exist? end |