# frozen_string_literal: true # typed: true module ServerUtils def log(messages) if SchemalessRestApi.log_type == :ougai log_msg = { method: request.request_method, path: request.fullpath, correlationId: @request_id } messages.each do |key, value| log_msg[key] = value end SchemalessRestApi.logger.info(log_msg) else message = messages.values.join(", ") SchemalessRestApi.logger.info "#{message}, #{request.request_method} #{request.fullpath}, CorrelationId: #{@request_id}" end end end