Commit b179911c authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'rails-logger-cop-13' into 'master'

Use applogger in project create service and after import service

See merge request gitlab-org/gitlab!32198
parents 156561fc 2cc8d6c9
...@@ -22,7 +22,7 @@ module Projects ...@@ -22,7 +22,7 @@ module Projects
# causing GC to run every time. # causing GC to run every time.
service.increment! service.increment!
rescue Projects::HousekeepingService::LeaseTaken => e rescue Projects::HousekeepingService::LeaseTaken => e
Rails.logger.info( # rubocop:disable Gitlab/RailsLogger Gitlab::AppLogger.info(
"Could not perform housekeeping for project #{@project.full_path} (#{@project.id}): #{e}") "Could not perform housekeeping for project #{@project.full_path} (#{@project.id}): #{e}")
end end
......
...@@ -166,7 +166,7 @@ module Projects ...@@ -166,7 +166,7 @@ module Projects
log_message = message.dup log_message = message.dup
log_message << " Project ID: #{@project.id}" if @project&.id log_message << " Project ID: #{@project.id}" if @project&.id
Rails.logger.error(log_message) # rubocop:disable Gitlab/RailsLogger Gitlab::AppLogger.error(log_message)
if @project && @project.persisted? && @project.import_state if @project && @project.persisted? && @project.import_state
@project.import_state.mark_as_failed(message) @project.import_state.mark_as_failed(message)
......
---
title: Use applogger in project create service and after import service
merge_request: 32198
author: Rajendra Kadam
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment