Module: IronNails::Logging::ClassLogger
- Included in:
- Controller::Base, Core::NailsEngine, Models::ModelMixin, View::Command, View::View, View::ViewModelMixin, View::XamlProxy, WpfApplication
- Defined in:
- lib/ironnails/logging/class_logger.rb
Instance Method Summary collapse
-
#log_on_error ⇒ Object
Ensures that a message is logged when the execution of the specified block throws an error.
-
#logger ⇒ Object
provides access for the logger we are using you can override this logger as long as it responds to the methods: debug, info, warn, error, fatal.
Instance Method Details
#log_on_error ⇒ Object
Ensures that a message is logged when the execution of the specified block throws an error. It will then re-raise the error.
16 17 18 19 20 21 22 23 |
# File 'lib/ironnails/logging/class_logger.rb', line 16 def log_on_error begin yield if block_given? rescue Exception => e logger.error "IronNails Error: #{e}" raise e end end |
#logger ⇒ Object
provides access for the logger we are using you can override this logger as long as it responds to the methods: debug, info, warn, error, fatal
10 11 12 |
# File 'lib/ironnails/logging/class_logger.rb', line 10 def logger IRONNAILS_DEFAULT_LOGGER end |