Module: PrettyLogger::ControllerMethods
- Defined in:
- lib/pretty_logger/controller_methods.rb
Instance Method Summary collapse
- #pretty_logit(extra_text = nil) ⇒ Object
- #prettylog_and_reraise!(exception) ⇒ Object
- #request_logger ⇒ Object
Instance Method Details
#pretty_logit(extra_text = nil) ⇒ Object
2 3 4 |
# File 'lib/pretty_logger/controller_methods.rb', line 2 def pretty_logit(extra_text=nil) request_logger.log_request(extra_text) end |
#prettylog_and_reraise!(exception) ⇒ Object
13 14 15 16 |
# File 'lib/pretty_logger/controller_methods.rb', line 13 def prettylog_and_reraise!(exception) request_logger.log_error(exception) raise exception end |
#request_logger ⇒ Object
6 7 8 9 10 11 |
# File 'lib/pretty_logger/controller_methods.rb', line 6 def request_logger @request_logger ||= ::PrettyLogger::RequestLogger.new( request: request, current_user: try(:current_user) ) end |