lib/proselytism/engine.rb in proselytism-0.0.1 vs lib/proselytism/engine.rb in proselytism-0.0.2
- old
+ new
@@ -9,16 +9,17 @@
params = YAML.load_file(config_file_path)
Proselytism.config do |config|
params[Rails.env].each do |k, v|
config.send "#{k}=", v
end
- Proselytism.config.logger = nil
end
end
end
ActiveSupport.on_load :after_initialize do |app|
- Proselytism.config.logger ||= Rails.logger
+ Proselytism.config.log_level ||= Rails.logger.level
+ Proselytism.config.log_path ||= File.join(Rails.root, 'log', "proselytism.log")
+ Proselytism.config.logger ||= Proselytism::BufferedLogger.new Proselytism.config.log_path, Proselytism.config.log_level
end
end
end
\ No newline at end of file