class CerberusUtils::Log

Singleton providing logging capabilities for the Cerberus Client Users can setup their own logger by calling Log.instance.setLoggingProvider and impelmenting the four log level output methods

Attributes

logProvider[R]

Public Class Methods

new() click to toggle source

Called by Singleton to setup our instance - default logger instantiated can be replaced by the user

# File lib/cerberus_utils/log.rb, line 20
def initialize
  @logProvider = DefaultLogger.new
end

Public Instance Methods

debug(msg) click to toggle source

Log a debug message to the default logger

# File lib/cerberus_utils/log.rb, line 55
def debug(msg)
  @logProvider.debug(msg)
end
error(msg) click to toggle source

Log a error message to the default logger

# File lib/cerberus_utils/log.rb, line 34
def error(msg)
  @logProvider.error(msg)
end
info(msg) click to toggle source

Log a info message to the default logger

# File lib/cerberus_utils/log.rb, line 48
def info(msg)
  @logProvider.info(msg)
end
setLoggingProvider(logProvider) click to toggle source

Set the logger to be used by Cerberus Client

# File lib/cerberus_utils/log.rb, line 27
def setLoggingProvider(logProvider)
  @logProvider = logProvider
end
warn(msg) click to toggle source

Log a warning message to the default logger

# File lib/cerberus_utils/log.rb, line 41
def warn(msg)
  @logProvider.warn(msg)
end