Module: Shoes::Log

Overview

Include this module to get a @log instance variable to log as your configured component.

Constant Summary collapse

DEFAULT_COMPONENT =

These constants will wind up included in a lot of places. Should they move?

"default"
DEFAULT_LOG_CONFIG =
{
  "default" => "info",
}
DEFAULT_DEBUG_LOG_CONFIG =
{
  "default" => "debug",
}

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.current_log_configObject (readonly)

Returns the value of attribute current_log_config.



28
29
30
# File 'lacci/lib/shoes/log.rb', line 28

def current_log_config
  @current_log_config
end

.instanceObject

Returns the value of attribute instance.



27
28
29
# File 'lacci/lib/shoes/log.rb', line 27

def instance
  @instance
end

Class Method Details

.configure_logger(log_config) ⇒ Object



40
41
42
# File 'lacci/lib/shoes/log.rb', line 40

def configure_logger(log_config)
  @instance.configure_logger(log_config)
end

.logger(component = self) ⇒ Object



36
37
38
# File 'lacci/lib/shoes/log.rb', line 36

def logger(component = self)
  @instance.logger_for_component(component)
end

Instance Method Details

#log_init(component = self) ⇒ Object



45
46
47
# File 'lacci/lib/shoes/log.rb', line 45

def log_init(component = self)
  @log = Shoes::Log.instance.logger_for_component(component)
end