module Jekyll::Algolia::Logger

def self.silent

temporarily and re-attributing the original method once finished.
loggued. It works by redefining Jekyll.logger.write to a noop
This is especially useful when Jekyll is too talkative about what is

end
# whatever Jekyll code here
Logger.silence do
Usage:
Public: Silence all Jekyll log output in this block
def self.silent
  initial_method = Jekyll.logger.method(:write)
  Utils.monkey_patch(Jekyll.logger, :write, proc { |*args| })
  begin
    yield
  ensure
    Utils.monkey_patch(Jekyll.logger, :write, initial_method)
  end
end