diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 11:10:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 11:10:13 +0000 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /lib/gitlab/error_tracking | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) | |
download | gitlab-ce-0ea3fcec397b69815975647f5e2aa5fe944a8486.tar.gz |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'lib/gitlab/error_tracking')
-rw-r--r-- | lib/gitlab/error_tracking/logger.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/error_tracking/logger.rb b/lib/gitlab/error_tracking/logger.rb index 1b081f943aa..f6b0a54fe22 100644 --- a/lib/gitlab/error_tracking/logger.rb +++ b/lib/gitlab/error_tracking/logger.rb @@ -3,6 +3,13 @@ module Gitlab module ErrorTracking class Logger < ::Gitlab::JsonLogger + def self.capture_exception(exception, **context_payload) + formatter = Gitlab::ErrorTracking::LogFormatter.new + log_hash = formatter.generate_log(exception, context_payload) + + self.error(log_hash) + end + def self.file_name_noext 'exceptions_json' end |