Skip to content

Commit

Permalink
consistent logging of shoryuken. datacite/datacite#733
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 20, 2019
1 parent 946af6a commit ea0749b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require "active_storage/engine"
require "action_controller/railtie"
require "rails/test_unit/railtie"
require "active_job/logging"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Expand Down Expand Up @@ -79,6 +80,8 @@ class Application < Rails::Application
config.logger = ActiveSupport::TaggedLogging.new(logger)
config.log_level = ENV['LOG_LEVEL'].to_sym

config.active_job.logger = config.logger

# configure caching
config.cache_store = :dalli_store, nil, { :namespace => ENV['APPLICATION'] }

Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
config.eager_load = false

# don't use debug level
config.log_level = :info
config.log_level = :error

# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
Expand Down
3 changes: 2 additions & 1 deletion config/initializers/_shoryuken.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Shoryuken.configure_server do |config|
logger = Shoryuken::Logging.logger
Rails.logger = Shoryuken::Logging.logger
Rails.logger.level = Logger.const_get(ENV["LOG_LEVEL"].upcase)
end

Shoryuken.active_job_queue_name_prefixing = true

0 comments on commit ea0749b

Please sign in to comment.