Class: Gitlab::ErrorTracking::Logger

Inherits:
JsonLogger
  • Object
show all
Defined in:
lib/gitlab/error_tracking/logger.rb

Class Method Summary collapse

Methods inherited from JsonLogger

build, cache_key, debug, error, file_name, full_log_path, info, warn

Class Method Details

.capture_exception(exception, **context_payload) ⇒ Object



6
7
8
9
10
11
# File 'lib/gitlab/error_tracking/logger.rb', line 6

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

.file_name_noextObject



13
14
15
# File 'lib/gitlab/error_tracking/logger.rb', line 13

def self.file_name_noext
  'exceptions_json'
end