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:
authorcharlieablett <cablett@gitlab.com>2019-05-02 03:16:49 +0300
committercharlieablett <cablett@gitlab.com>2019-05-30 09:27:28 +0300
commit2c011cb5b452409db7fe1c810f1ad7440a6cedce (patch)
treef2b85b2ae667dd2673090efa0d984da328d0e031 /lib/gitlab/graphql_logger.rb
parent1f37aed1c917260eefda63a18d3a9af91c4a1abb (diff)
Implement logger analyzer
- Modify GraphqlLogger to subclass JsonLogger - Replace the single-line analyser with one that can log all the GraphQL query related information in one place. - Implement analyzer behavior with spec
Diffstat (limited to 'lib/gitlab/graphql_logger.rb')
-rw-r--r--lib/gitlab/graphql_logger.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/gitlab/graphql_logger.rb b/lib/gitlab/graphql_logger.rb
index aff3ff5f48d..43d917908b6 100644
--- a/lib/gitlab/graphql_logger.rb
+++ b/lib/gitlab/graphql_logger.rb
@@ -1,19 +1,9 @@
# frozen_string_literal: true
module Gitlab
- class GraphqlLogger < Gitlab::Logger
+ class GraphqlLogger < Gitlab::JsonLogger
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