class Gapic::LoggingConcerns::StubLogger
A convenience object used by stub-based logging.
@private
#
def debug &block
def debug &block log Logger::DEBUG, &block end
def info &block
def info &block log Logger::INFO, &block end
def initialize logger: nil, **kwargs
def initialize logger: nil, **kwargs @logger = logger @kwargs = kwargs end
def log severity
def log severity return unless @logger locations = caller_locations @logger.add severity do builder = LogEntryBuilder.new(**@kwargs) builder.set_source_location_from locations yield builder builder.build rescue StandardError # Do nothing end end