Class: ZLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/ZLogger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(baseExecutePath) ⇒ ZLogger

Returns a new instance of ZLogger.



9
10
11
# File 'lib/ZLogger.rb', line 9

def initialize(baseExecutePath)
    @logger = Logger.new("#{baseExecutePath}/execute.log")
end

Instance Attribute Details

#loggerObject

Returns the value of attribute logger.



7
8
9
# File 'lib/ZLogger.rb', line 7

def logger
  @logger
end

Instance Method Details

#logError(message) ⇒ Object



13
14
15
16
# File 'lib/ZLogger.rb', line 13

def logError(message)
    result = "#{caller[0]}: #{message}"
    logger.error(result)
end

#logInfo(message) ⇒ Object



23
24
25
26
# File 'lib/ZLogger.rb', line 23

def logInfo(message)
    result = "#{caller[0]}: #{message}"
    logger.info(result)
end

#logWarn(message) ⇒ Object



18
19
20
21
# File 'lib/ZLogger.rb', line 18

def logWarn(message)
    result = "#{caller[0]}: #{message}"
    logger.warn(result)
end