Commit 8794a0cb authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Use applogger in export service

parent 11271ac4
......@@ -115,11 +115,11 @@ module Projects
end
def notify_success
Rails.logger.info("Import/Export - Project #{project.name} with ID: #{project.id} successfully exported") # rubocop:disable Gitlab/RailsLogger
Gitlab::AppLogger.info("Import/Export - Project #{project.name} with ID: #{project.id} successfully exported")
end
def notify_error
Rails.logger.error("Import/Export - Project #{project.name} with ID: #{project.id} export error - #{shared.errors.join(', ')}") # rubocop:disable Gitlab/RailsLogger
Gitlab::AppLogger.error("Import/Export - Project #{project.name} with ID: #{project.id} export error - #{shared.errors.join(', ')}")
notification_service.project_not_exported(project, current_user, shared.errors)
end
......
---
title: Use applogger in export service
merge_request: 32203
author: Rajendra Kadam
type: fixed
......@@ -119,9 +119,9 @@ describe Projects::ImportExport::ExportService do
end
it 'notifies logger' do
allow(Rails.logger).to receive(:error)
allow(Gitlab::AppLogger).to receive(:error)
expect(Rails.logger).to receive(:error)
expect(Gitlab::AppLogger).to receive(:error)
end
end
end
......@@ -149,7 +149,7 @@ describe Projects::ImportExport::ExportService do
end
it 'notifies logger' do
expect(Rails.logger).to receive(:error)
expect(Gitlab::AppLogger).to receive(:error)
end
it 'does not call the export strategy' do
......
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