gems.sass-3.2.9.lib.sass.logger.base.rb Maven / Gradle / Ivy
Go to download
Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector
inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a
web-framework plugin.
This is a repackaged GEM in a JAR format of the sass-lang.gem package. The sass-gems package version
follows the sass-lang.gem versions located http://rubyforge.org/frs/?group_id=9702. Simply change
the version of this package to download and repackage the same GEM version.
The newest version!
require 'sass/logger/log_level'
class Sass::Logger::Base
include Sass::Logger::LogLevel
attr_accessor :log_level
attr_accessor :disabled
log_level :trace
log_level :debug
log_level :info
log_level :warn
log_level :error
def initialize(log_level = :debug)
self.log_level = log_level
end
def logging_level?(level)
!disabled && self.class.log_level?(level, log_level)
end
def log(level, message)
self._log(level, message) if logging_level?(level)
end
def _log(level, message)
Kernel::warn(message)
end
end