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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-12 21:07:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-12 21:07:34 +0300
commit90859e80ca23b8709d56b60d2066b569053e7e02 (patch)
tree15d9ac5c194220fab358c42325645fdf2c6ead13 /lib/gitlab/puma_logging
parent7530cf5ad8dd86fbe19e129b6bb31b23849ed757 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/puma_logging')
-rw-r--r--lib/gitlab/puma_logging/json_formatter.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/puma_logging/json_formatter.rb b/lib/gitlab/puma_logging/json_formatter.rb
new file mode 100644
index 00000000000..9eeb980fc53
--- /dev/null
+++ b/lib/gitlab/puma_logging/json_formatter.rb
@@ -0,0 +1,13 @@
+# 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