Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dumpcar.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
# Uncomment to register a new dependency of your gem
spec.add_dependency "rails", ">= 6"
spec.add_dependency "terrapin", ">= 1"
spec.add_dependency "multi_logger" # used for outputting to both the Rails log and console

# For more information and examples about making a new gem, check out our
# guide at: https://bundler.io/guides/creating_gem.html
Expand Down
4 changes: 3 additions & 1 deletion lib/dumpcar/util.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
module Dumpcar::Util
require "multi_logger"

def self.get_connection_db_config
(Rails.version < "6.1") ? ActiveRecord::Base.connection_config : ActiveRecord::Base.connection_db_config.configuration_hash
end

def self.logger
Rails.logger
MultiLogger.new(Rails.logger, Logger.new($stdout))
end
end
Loading