summaryrefslogtreecommitdiff
path: root/lib/gitlab/grape_logging/loggers/content_logger.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/grape_logging/loggers/content_logger.rb')
-rw-r--r--lib/gitlab/grape_logging/loggers/content_logger.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/gitlab/grape_logging/loggers/content_logger.rb b/lib/gitlab/grape_logging/loggers/content_logger.rb
new file mode 100644
index 00000000000..658953adc80
--- /dev/null
+++ b/lib/gitlab/grape_logging/loggers/content_logger.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module GrapeLogging
+ module Loggers
+ class ContentLogger < ::GrapeLogging::Loggers::Base
+ def parameters(request, _)
+ {
+ content_length: request.env['CONTENT_LENGTH'],
+ content_range: request.env['HTTP_CONTENT_RANGE']
+ }.compact
+ end
+ end
+ end
+ end
+end