debian-mirror-gitlab/lib/gitlab/error_tracking/logger.rb
2022-07-23 20:15:48 +02:00

18 lines
427 B
Ruby

# frozen_string_literal: true
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
end
end
end