Module: LogDecorator

Defined in:
lib/log_decorator.rb,
lib/log_decorator/logging.rb,
lib/log_decorator/version.rb,
lib/log_decorator/log_proxy.rb

Defined Under Namespace

Modules: Logging Classes: LogProxy

Constant Summary collapse

DEFAULT_PREFIX =
lambda do |klass, separator, location|
  location = location.first if location.is_a?(Array)
  meth = location.base_label
  meth ? "#{klass}#{separator}#{meth}" : klass
end
DEFAULT_LOG_LEVELS =
[:debug, :info, :warn, :error]
VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Attribute Details

.log_levelsObject



22
23
24
# File 'lib/log_decorator.rb', line 22

def log_levels
  @log_levels ||= DEFAULT_LOG_LEVELS
end

.loggerObject

Returns the value of attribute logger.



16
17
18
# File 'lib/log_decorator.rb', line 16

def logger
  @logger
end

.prefixObject



18
19
20
# File 'lib/log_decorator.rb', line 18

def prefix
  @prefix ||= DEFAULT_PREFIX
end