Welcome to mirror list, hosted at ThFree Co, Russian Federation.

json_formatter.rb « puma_logging « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6d97b6615aa5c9659496a05da05ee07208f9b809 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

require 'json'
require 'time'

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