1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 Server::Application.configure do
8 config.lograge.enabled = true
9 config.lograge.formatter = Lograge::Formatters::Logstash.new
10 config.lograge.custom_options = lambda do |event|
11 exceptions = %w(controller action format id)
12 params = event.payload[:params].except(*exceptions)
13 params_s = SafeJSON.dump(params)
14 if params_s.length > Rails.configuration.max_request_log_params_size
15 { params_truncated: params_s[0..Rails.configuration.max_request_log_params_size] + "[...]" }