class Sass::Logger::Delayed

messages can be flushed by calling {#flush}.
the original logger can be replaced by calling {#uninstall!}. The log
This can be installed around the current logger by calling {#install!}, and
logger.
A logger that delays messages until they’re explicitly flushed to an inner

def self.install!

Returns:
  • (Sass::Logger::Delayed) - The newly-created logger.
def self.install!
  logger = Sass::Logger::Delayed.new(Sass.logger)
  Sass.logger = logger
  logger
end

def _log(level, message)

def _log(level, message)
  @messages << [level, message]
end

def flush

Flushes all queued logs to the wrapped logger.
def flush
  @messages.each {|(l, m)| @inner.log(l, m)}
end

def initialize(inner)

Parameters:
  • inner (Sass::Logger::Base) -- The wrapped logger.
def initialize(inner)
  self.log_level = inner.log_level
  @inner = inner
  @messages = []
end

def uninstall!

the logger was installed using \{#install!}
Uninstalls this logger from \{Sass.logger\}. This should only be called if
def uninstall!
  if Sass.logger != self
    throw Exception.new("Can't uninstall a logger that's not currently installed.")
  end
  @inner.log_level = log_level
  Sass.logger = @inner
end