mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 21:16:28 +08:00
ebd4140492
We had a missing formats: string on our render partial that caused logs to spam when CSS files got 404s. Due to magic discourse_public_exceptions.rb was actually returning the correct 404 cause it switched format when rendering the error.
30 lines
396 B
Ruby
30 lines
396 B
Ruby
class FakeLogger
|
|
attr_reader :warnings, :errors, :infos, :fatals
|
|
|
|
def initialize
|
|
@warnings = []
|
|
@errors = []
|
|
@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 formatter
|
|
end
|
|
end
|