Commit 75b7ba3f authored by Stan Hu's avatar Stan Hu

Identify merge request project and IID in log message

parent 47b0edbe
...@@ -67,9 +67,15 @@ module MergeRequests ...@@ -67,9 +67,15 @@ module MergeRequests
end end
def log_merge_error(message, http_error = false) def log_merge_error(message, http_error = false)
Rails.logger.error("MergeService error: #{message}") Rails.logger.error("MergeService ERROR: #{merge_request_info} - #{message}")
error(message) if http_error error(message) if http_error
end end
def merge_request_info
project = merge_request.project
"#{project.to_reference}#{merge_request.to_reference}"
end
end end
end end
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