2019-04-29 20:27:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-10-09 21:34:50 -04:00
|
|
|
class FakeLogger
|
2022-05-04 21:50:43 -04:00
|
|
|
attr_reader :debug, :infos, :warnings, :errors, :fatals
|
2021-03-15 00:36:10 -04:00
|
|
|
attr_accessor :level
|
2018-10-09 21:34:50 -04:00
|
|
|
|
|
|
|
def initialize
|
2021-02-12 08:53:36 -05:00
|
|
|
@debug = []
|
2018-10-22 13:22:23 -04:00
|
|
|
@infos = []
|
2022-05-04 21:50:43 -04:00
|
|
|
@warnings = []
|
|
|
|
@errors = []
|
2019-02-14 01:58:16 -05:00
|
|
|
@fatals = []
|
2018-10-22 13:22:23 -04:00
|
|
|
end
|
|
|
|
|
2022-05-04 21:50:43 -04:00
|
|
|
def debug(message)
|
|
|
|
@debug << message
|
|
|
|
end
|
|
|
|
|
2018-10-22 13:22:23 -04:00
|
|
|
def info(message = nil)
|
|
|
|
@infos << message
|
2018-10-09 21:34:50 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def warn(message)
|
|
|
|
@warnings << message
|
|
|
|
end
|
|
|
|
|
|
|
|
def error(message)
|
|
|
|
@errors << message
|
|
|
|
end
|
2019-02-14 01:58:16 -05:00
|
|
|
|
|
|
|
def fatal(message)
|
|
|
|
@fatals << message
|
|
|
|
end
|
|
|
|
|
|
|
|
def formatter
|
|
|
|
end
|
2018-10-09 21:34:50 -04:00
|
|
|
end
|