Module: Lokap::Metadata
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/lokap/metadata.rb
Instance Method Summary collapse
- #log_metadata(message, flush: false) ⇒ Object (also: #log_md)
-
#reset_metadata! ⇒ Object
make the log method configurable on class method lokap_metadata :metadata, log_method: :log thing.log.
Instance Method Details
#log_metadata(message, flush: false) ⇒ Object Also known as: log_md
15 16 17 18 19 20 21 |
# File 'lib/lokap/metadata.rb', line 15 def (, flush: false) Rails.logger.info("Metadata Log: #{message}") = [Time.now.iso8601, ].join(': ') self.logs << save if flush end |
#reset_metadata! ⇒ Object
make the log method configurable on class method lokap_metadata :metadata, log_method: :log thing.log
27 28 29 |
# File 'lib/lokap/metadata.rb', line 27 def self. = {}; save end |