Class: VWO::CustomLogger
- Inherits:
-
Object
- Object
- VWO::CustomLogger
- Defined in:
- lib/vwo/custom_logger.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(logger_instance) ⇒ CustomLogger
constructor
A new instance of CustomLogger.
-
#log(level, message) ⇒ Object
Override this method to handle logs in a custom manner.
Constructor Details
#initialize(logger_instance) ⇒ CustomLogger
Returns a new instance of CustomLogger.
14 15 16 |
# File 'lib/vwo/custom_logger.rb', line 14 def initialize(logger_instance) @@logger_instance = logger_instance || Logger.new(STDOUT) end |
Class Method Details
.get_instance(logger_instance = nil) ⇒ Object
10 11 12 |
# File 'lib/vwo/custom_logger.rb', line 10 def self.get_instance(logger_instance = nil) @@logger ||= VWO::CustomLogger.new(logger_instance) end |
Instance Method Details
#log(level, message) ⇒ Object
Override this method to handle logs in a custom manner
19 20 21 |
# File 'lib/vwo/custom_logger.rb', line 19 def log(level, ) @@logger_instance.log(level, ) end |