Class: Mutx::Support::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/mutx/support/log.rb

Class Method Summary collapse

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

Returns:

  • (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

.startObject



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