Module: Beautiful::Log

Defined in:
lib/beautiful/log.rb,
lib/beautiful/log/modules.rb,
lib/beautiful/log/version.rb,
lib/beautiful/log/formatter.rb,
lib/beautiful/log/task_logging.rb,
lib/beautiful/log/modules/stylable.rb,
lib/beautiful/log/modules/path_ommittable.rb,
lib/beautiful/log/modules/error_formattable.rb,
lib/beautiful/log/modules/render_log_formatter.rb,
lib/beautiful/log/modules/code_range_extractable.rb,
lib/beautiful/log/modules/complete_log_formatter.rb

Defined Under Namespace

Modules: Modules, TaskLogging Classes: Formatter

Constant Summary collapse

VERSION =
'0.2.1'.freeze

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



8
9
10
11
12
13
# File 'lib/beautiful/log.rb', line 8

def self.included(klass)
  return unless defined?(Rails) && klass < Rails::Application
  config = klass.config
  Rails.logger = Logger.new(config.paths['log'].first)
  Rails.logger.formatter = Beautiful::Log::Formatter.new
end