lib/logux_rails.rb in logux_rails-0.1.0 vs lib/logux_rails.rb in logux_rails-0.2.0

- old
+ new

@@ -1,3 +1,24 @@ # frozen_string_literal: true -require 'logux' +require 'action_controller' +require 'active_support' +require 'logux/rack' +require 'rails/engine' +require 'logux/engine' + +module Logux + autoload :Model, 'logux/model' + + configurable %i[ + action_watcher + action_watcher_options + ] + + configuration_defaults do |config| + config.action_watcher = Logux::Model::UpdatesDeprecator + config.action_watcher_options = { level: :error } + config.logger = Rails.logger if defined?(Rails.logger) + config.logger ||= ActiveSupport::Logger.new(STDOUT) + config.on_error = proc {} + end +end