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 17 18 |
# File 'lib/ZLogger.rb', line 13 def logError() result = "#{caller[0]}: #{}" puts "Error: #{result}" logger.error(result) end |
#logInfo(message) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/ZLogger.rb', line 27 def logInfo() result = "#{caller[0]}: #{}" puts "Info: #{result}" logger.info(result) end |
#logWarn(message) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/ZLogger.rb', line 20 def logWarn() result = "#{caller[0]}: #{}" puts "Warning: #{result}" logger.warn(result) end |