Module: NdrError::Logging
- Included in:
- NdrError
- Defined in:
- lib/ndr_error/logging.rb
Overview
Module to contain helpers for logging
Constant Summary collapse
- ANCILLARY_ATTRS_WHITELIST =
Which attributes can be populated when manually logging an exception:
[:user_id, :user_roles, :svn_revision]
Instance Method Summary collapse
-
#log(exception, ancillary_data, request_object) ⇒ Object
Log the given
exception.
Instance Method Details
#log(exception, ancillary_data, request_object) ⇒ Object
Log the given exception.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ndr_error/logging.rb', line 8 def log(exception, ancillary_data, request_object) log = initialize_log(ancillary_data) log.register_exception(exception) log.register_request(request_object) print = Fingerprint.find_or_create_by_id(log.md5_digest) error = print.store_log(log) [print, error] end |