debian-mirror-gitlab/lib/gitlab/error_tracking/logger.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
427 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
# frozen_string_literal: true
module Gitlab
module ErrorTracking
class Logger < ::Gitlab::JsonLogger
2022-07-23 23:45:48 +05:30
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
2020-01-01 13:55:28 +05:30
def self.file_name_noext
'exceptions_json'
end
end
end
end