Sha256: 397ac1b8a7cca9861f8b63ce4c96459a57c83da19847db4eb1e5cf357b2b64c8
Contents?: true
Size: 1.1 KB
Versions: 15
Compression:
Stored size: 1.1 KB
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. # Base class for startup logging and testing in multiverse module NewRelic module Agent class MemoryLogger def initialize @messages = [] end def is_startup_logger? true end attr_accessor :messages, :level def fatal(*msgs, &blk) messages << [:fatal, msgs, blk] end def error(*msgs, &blk) messages << [:error, msgs, blk] end def warn(*msgs, &blk) messages << [:warn, msgs, blk] end def info(*msgs, &blk) messages << [:info, msgs, blk] end def debug(*msgs, &blk) messages << [:debug, msgs, blk] end def log_exception(level, e, backtrace_level=level) messages << [:log_exception, [level, e, backtrace_level]] end def dump(logger) messages.each do |(method, args, blk)| logger.send(method, *args, &blk) end messages.clear end end end end
Version data entries
15 entries across 15 versions & 1 rubygems