lib/lotus/loader.rb in lotusrb-0.2.0 vs lib/lotus/loader.rb in lotusrb-0.2.1
- old
+ new
@@ -38,10 +38,11 @@
def configure_frameworks!
_configure_model_framework! if defined?(Lotus::Model)
_configure_controller_framework!
_configure_view_framework!
+ _configure_logger!
end
def _configure_controller_framework!
config = configuration
unless namespace.const_defined?('Controller')
@@ -85,9 +86,15 @@
application_module.const_set('Model', model)
end
end
+ def _configure_logger!
+ unless application_module.const_defined?('Logger', false)
+ logger = Lotus::Logger.new(application_module.to_s)
+ application_module.const_set('Logger', logger)
+ end
+ end
def load_frameworks!
_load_view_framework!
_load_model_framework!
end