lib/dry/monitor/sql/logger.rb in dry-monitor-0.6.3 vs lib/dry/monitor/sql/logger.rb in dry-monitor-0.7.0
- old
+ new
@@ -1,19 +1,17 @@
# frozen_string_literal: true
-require "dry-configurable"
-require "dry/core/extensions"
-
module Dry
module Monitor
Notifications.register_event(:sql)
module SQL
class Logger
extend Dry::Core::Extensions
extend Dry::Configurable
+ # rubocop:disable Lint/ConstantDefinitionInBlock
register_extension(:default_colorizer) do
require "dry/monitor/sql/colorizers/default"
module DefaultColorizer
def colorizer
@@ -33,9 +31,10 @@
end
end
Logger.include(RougeColorizer)
end
+ # rubocop:enable Lint/ConstantDefinitionInBlock
setting :theme
setting :message_template, default: %( Loaded %s in %sms %s)
attr_reader :config, :logger, :template