discourse/spec/support/fake_logger.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
516 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class FakeLogger
attr_reader :warnings, :errors, :infos, :fatals
attr_accessor :level
def initialize
@warnings = []
@errors = []
@debug = []
@infos = []
@fatals = []
end
def info(message = nil)
@infos << message
end
def warn(message)
@warnings << message
end
def error(message)
@errors << message
end
def fatal(message)
@fatals << message
end
def debug(message)
@debug << message
end
def formatter
end
end