debian-mirror-gitlab/lib/gitlab/puma_logging/json_formatter.rb

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

15 lines
247 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
# frozen_string_literal: true
require 'json'
2023-07-09 08:55:56 +05:30
require 'time'
2020-01-01 13:55:28 +05:30
module Gitlab
module PumaLogging
class JSONFormatter
def call(str)
{ timestamp: Time.now.utc.iso8601(3), pid: $$, message: str }.to_json
end
end
end
end