Class: Slf4r::LoggingGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/slf4r/logging/logging_generator.rb

Instance Method Summary collapse

Instance Method Details

#setupObject

source_root File.expand_path(‘../templates’, __FILE__)



4
5
6
7
8
9
# File 'lib/generators/slf4r/logging/logging_generator.rb', line 4

def setup
  source = File.expand_path('../../templates', __FILE__)
  initializer "logging.rb", File.read(File.join(source, "logging.rb"))
  gem 'slf4r', :require => 'slf4r/logging_logger'
  gem "logging"
end