lib/ezlog/railtie.rb in ezlog-0.5.3 vs lib/ezlog/railtie.rb in ezlog-0.6.0
- old
+ new
@@ -1,7 +1,10 @@
module Ezlog
class Railtie < Rails::Railtie
+ config.ezlog = ActiveSupport::OrderedOptions.new
+ config.ezlog.enable_sequel_logging = false
+
initializer "ezlog.initialize" do
require "ezlog/rails/extensions"
end
initializer 'ezlog.configure_logging' do |app|
@@ -11,11 +14,11 @@
initializer 'ezlog.configure_sidekiq' do |app|
initialize_sidekiq_logging(app) if defined? ::Sidekiq
end
- initializer 'ezlog.configure_sequel' do
- ::Sequel::Database.extension :ezlog_logging if defined? ::Sequel
+ initializer 'ezlog.configure_sequel' do |app|
+ ::Sequel::Database.extension :ezlog_logging if defined?(::Sequel) && app.config.ezlog.enable_sequel_logging
end
initializer 'ezlog.configure_rack_timeout' do
disable_rack_timeout_logging if defined? ::Rack::Timeout
end