Class: Sass::Logger::Base

Inherits:
Object
  • Object
show all
Includes:
LogLevel
Defined in:
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/logger/base.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Base) initialize(log_level = :debug)

Returns a new instance of Base



15
16
17
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/logger/base.rb', line 15

def initialize(log_level = :debug)
  self.log_level = log_level
end

Instance Attribute Details

- disabled

Returns the value of attribute disabled



7
8
9
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/logger/base.rb', line 7

def disabled
  @disabled
end

- log_level

Returns the value of attribute log_level



6
7
8
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/logger/base.rb', line 6

def log_level
  @log_level
end

Instance Method Details

- _log(level, message)



27
28
29
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/logger/base.rb', line 27

def _log(level, message)
  Kernel.warn(message)
end

- log(level, message)



23
24
25
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/logger/base.rb', line 23

def log(level, message)
  _log(level, message) if logging_level?(level)
end

- (Boolean) logging_level?(level)

Returns:

  • (Boolean)


19
20
21
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/logger/base.rb', line 19

def logging_level?(level)
  !disabled && self.class.log_level?(level, log_level)
end