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:
Diffstat (limited to 'lib/gitlab/graphql_logger.rb')
-rw-r--r--lib/gitlab/graphql_logger.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/gitlab/graphql_logger.rb b/lib/gitlab/graphql_logger.rb
new file mode 100644
index 00000000000..aff3ff5f48d
--- /dev/null
+++ b/lib/gitlab/graphql_logger.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module Gitlab
+ class GraphqlLogger < Gitlab::Logger
+ def self.file_name_noext
+ 'graphql_json'
+ end
+
+ # duration
+ # complexity
+ # depth
+ # sanitized variables (?)
+ # a structured representation of the query (?)
+
+ def format_message(severity, timestamp, progname, msg)
+ "#{timestamp.to_s(:long)}: #{msg}\n"
+ end
+ end
+end