Class: Hanami::Providers::DBLogging Private
- Inherits:
-
Hanami::Provider::Source
- Object
- Dry::System::Provider::Source
- Hanami::Provider::Source
- Hanami::Providers::DBLogging
- Defined in:
- lib/hanami/providers/db_logging.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from Hanami::Provider::Source
Instance Method Summary collapse
- #prepare ⇒ Object private
- #start ⇒ Object private
Methods inherited from Hanami::Provider::Source
#initialize, #target_container
Constructor Details
This class inherits a constructor from Hanami::Provider::Source
Instance Method Details
#prepare ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 13 |
# File 'lib/hanami/providers/db_logging.rb', line 10 def prepare require "dry/monitor/sql/logger" slice["notifications"].register_event :sql end |
#start ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 |
# File 'lib/hanami/providers/db_logging.rb', line 17 def start Dry::Monitor::SQL::Logger.new(slice["logger"]).subscribe(slice["notifications"]) end |