Commit eb985075 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Use applogger in new note worker

parent 11271ac4
......@@ -16,7 +16,7 @@ class NewNoteWorker # rubocop:disable Scalability/IdempotentWorker
NotificationService.new.new_note(note) unless skip_notification?(note)
Notes::PostProcessService.new(note).execute
else
Rails.logger.error("NewNoteWorker: couldn't find note with ID=#{note_id}, skipping job") # rubocop:disable Gitlab/RailsLogger
Gitlab::AppLogger.error("NewNoteWorker: couldn't find note with ID=#{note_id}, skipping job")
end
end
......
---
title: Use applogger in new note worker
merge_request: 32213
author: Rajendra Kadam
type: fixed
......@@ -27,7 +27,7 @@ describe NewNoteWorker do
let(:unexistent_note_id) { non_existing_record_id }
it 'logs NewNoteWorker process skipping' do
expect(Rails.logger).to receive(:error)
expect(Gitlab::AppLogger).to receive(:error)
.with("NewNoteWorker: couldn't find note with ID=#{unexistent_note_id}, skipping job")
described_class.new.perform(unexistent_note_id)
......
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