Sha256: 1479899d51e60fb573df64c62392952f0f4dbf13275a03375b712a53c9f15514
Contents?: true
Size: 454 Bytes
Versions: 67
Compression:
Stored size: 454 Bytes
Contents
module LogHelpers def use_logger_with(log) Appsignal.logger = test_logger(log) yield Appsignal.logger = nil end def test_logger(log) Logger.new(log).tap do |logger| logger.formatter = proc do |severity, _datetime, _progname, msg| # This format is used in the `contains_log` matcher. "[#{severity}] #{msg}\n" end end end def log_contents(log) log.rewind log.read end end
Version data entries
67 entries across 67 versions & 1 rubygems