Class: ConfigCat::ConfigCatLogger

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

Instance Method Summary collapse

Constructor Details

#initialize(hooks) ⇒ ConfigCatLogger

Returns a new instance of ConfigCatLogger.



3
4
5
# File 'lib/configcat/configcatlogger.rb', line 3

def initialize(hooks)
  @hooks = hooks
end

Instance Method Details

#debug(message) ⇒ Object



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

def debug(message)
  ConfigCat.logger.debug(message)
end

#error(message) ⇒ Object



19
20
21
22
# File 'lib/configcat/configcatlogger.rb', line 19

def error(message)
  @hooks.invoke_on_error(message)
  ConfigCat.logger.error(message)
end

#info(message) ⇒ Object



11
12
13
# File 'lib/configcat/configcatlogger.rb', line 11

def info(message)
  ConfigCat.logger.info(message)
end

#warn(message) ⇒ Object



15
16
17
# File 'lib/configcat/configcatlogger.rb', line 15

def warn(message)
  ConfigCat.logger.warn(message)
end