debian-mirror-gitlab/lib/gitlab/memory/diagnostic_reports_logger.rb
2022-11-25 23:54:43 +05:30

19 lines
413 B
Ruby

# frozen_string_literal: true
require 'logger'
module Gitlab
module Memory
class DiagnosticReportsLogger < ::Logger
def format_message(severity, timestamp, progname, message)
data = {}
data[:severity] = severity
data[:time] = timestamp.utc.iso8601(3)
data.merge!(message)
"#{JSON.generate(data)}\n" # rubocop:disable Gitlab/Json
end
end
end
end