Skip to content

Commit

Permalink
Normalize logging
Browse files Browse the repository at this point in the history
Get app log messages going to `production.log` without chattiness of
logging every http request since sdr-api is on the www.

Fixes #178
  • Loading branch information
edsu committed Aug 2, 2023
1 parent 2d74f38 commit 8020012
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/resources_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def validate_version

def cocina_update_model
new_model_params = cocina_update_params.deep_dup
Rails.logger.info("updating cocina: #{JSON.generate(new_model_params)}")
decorate_file_sets(new_model_params)
Cocina::Models.build(new_model_params)
end
Expand Down
1 change: 1 addition & 0 deletions config/initializers/lograge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

Rails.application.configure do
config.lograge.enabled = Rails.env.production?
config.lograge.base_controller_class = 'ActionController::API'
end

0 comments on commit 8020012

Please sign in to comment.