Class: ZLogger
- Inherits:
-
Object
- Object
- ZLogger
- Defined in:
- lib/ZLogger.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(baseExecutePath) ⇒ ZLogger
constructor
A new instance of ZLogger.
- #logError(message) ⇒ Object
- #logInfo(message) ⇒ Object
- #logWarn(message) ⇒ Object
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
#logger ⇒ Object
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() result = "#{caller[0]}: #{}" logger.error(result) end |
#logInfo(message) ⇒ Object
23 24 25 26 |
# File 'lib/ZLogger.rb', line 23 def logInfo() result = "#{caller[0]}: #{}" logger.info(result) end |
#logWarn(message) ⇒ Object
18 19 20 21 |
# File 'lib/ZLogger.rb', line 18 def logWarn() result = "#{caller[0]}: #{}" logger.warn(result) end |