diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-11-20 12:22:06 -0200 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-11-20 12:22:06 -0200 |
commit | fad11dec23425ca1f83ff7ef745cc933ea6d2aa2 (patch) | |
tree | 9faa814c4b96120a9c9a13cea0ef7d5e59e5c8eb | |
parent | 011558ea4ac59bce74c18d2f7c55ac257de111c6 (diff) | |
download | gitlab-ce-fad11dec23425ca1f83ff7ef745cc933ea6d2aa2.tar.gz |
Add MR reference to logs
-rw-r--r-- | app/services/merge_requests/merge_service.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/services/merge_requests/merge_service.rb b/app/services/merge_requests/merge_service.rb index ac96182e473..0fa1e46ae3d 100644 --- a/app/services/merge_requests/merge_service.rb +++ b/app/services/merge_requests/merge_service.rb @@ -94,6 +94,11 @@ module MergeRequests @merge_request.update(merge_error: log_message) if save_message_on_model end + def log_info(message) + @logger ||= Rails.logger + @logger.info("#{merge_request_info} - #{message}") + end + def merge_request_info merge_request.to_reference(full: true) end @@ -101,10 +106,5 @@ module MergeRequests def find_merge_source merge_request.diff_head_sha end - - def log_info(message) - @logger ||= Rails.logger - @logger.info(message) - end end end |