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

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

require 'json'

module Gitlab
  module OmniauthLogging
    class JSONFormatter
      def call(severity, datetime, progname, msg)
        { severity: severity, timestamp: datetime.utc.iso8601(3), pid: $$, progname: progname, message: msg }.to_json << "\n"
      end
    end
  end
end