diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-15 21:06:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-15 21:06:24 +0300 |
commit | eca3cd3a9e7d9ea680086cad8150050ec8cdef3f (patch) | |
tree | c3d262e0d8e721fc138c2d617f501fb09876f1b6 /app/services/concerns | |
parent | 6e81d7f6283fae1b22f66b9d9b133243921cbd9e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/concerns')
-rw-r--r-- | app/services/concerns/git/logger.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/services/concerns/git/logger.rb b/app/services/concerns/git/logger.rb new file mode 100644 index 00000000000..7c036212e66 --- /dev/null +++ b/app/services/concerns/git/logger.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Git + module Logger + def log_error(message, save_message_on_model: false) + Gitlab::GitLogger.error("#{self.class.name} error (#{merge_request.to_reference(full: true)}): #{message}") + merge_request.update(merge_error: message) if save_message_on_model + end + end +end |