diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-24 09:08:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-24 09:08:51 +0000 |
commit | 38149afcf95e7669a7a99828c579d185b70c04dc (patch) | |
tree | 3a90504bd926407c0cc60f44e20dba08217b928b /lib/gitlab/omniauth_logging | |
parent | be660fe1d28a65ad61be24c71e66ae90f6488dc4 (diff) | |
download | gitlab-ce-38149afcf95e7669a7a99828c579d185b70c04dc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/omniauth_logging')
-rw-r--r-- | lib/gitlab/omniauth_logging/json_formatter.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/omniauth_logging/json_formatter.rb b/lib/gitlab/omniauth_logging/json_formatter.rb new file mode 100644 index 00000000000..cdd4da31803 --- /dev/null +++ b/lib/gitlab/omniauth_logging/json_formatter.rb @@ -0,0 +1,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 |