Module: ForemanOpenscap::BodyLogExtensions

Extended by:
ActiveSupport::Concern
Included in:
Api::V2::Compliance::ScapContentsController, Api::V2::Compliance::TailoringFilesController
Defined in:
app/controllers/concerns/foreman_openscap/body_log_extensions.rb

Instance Method Summary collapse

Instance Method Details

#log_response_bodyObject



5
6
7
8
# File 'app/controllers/concerns/foreman_openscap/body_log_extensions.rb', line 5

def log_response_body
  return super unless skip_body_log.include?(action_name)
  logger.debug { logger_msg }
end

#logger_msgObject



14
15
16
# File 'app/controllers/concerns/foreman_openscap/body_log_extensions.rb', line 14

def logger_msg
  "Logging response body of #{response.body.length} characters skipped when downloading DS files"
end

#skip_body_logObject



10
11
12
# File 'app/controllers/concerns/foreman_openscap/body_log_extensions.rb', line 10

def skip_body_log
  ['xml']
end