debian-mirror-gitlab/lib/gitlab/memory/diagnostic_reports_logger.rb

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

20 lines
413 B
Ruby
Raw Normal View History

2022-11-25 23:54:43 +05:30
# 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