gitlab-org--gitlab-foss/lib/gitlab/puma_logging/json_formatter.rb

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

14 lines
232 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
require 'json'
module Gitlab
module PumaLogging
class JSONFormatter
def call(str)
{ timestamp: Time.now.utc.iso8601(3), pid: $$, message: str }.to_json
end
end
end
end