I want to print a value to string format.
Rails.logger.debug(request)
while am trying to print am getting the output as
#<ActionDispatch::Request:0x45aa2c8>
How can i print this value to string form.
You can .inspect the object to output its contents, but keep in mind this object is a class that contains more than just one string. If there is a specific piece of data you are after please add that to your question.
Rails.logger.debug(request.inspect)
ActionDispatch::Request documentation - look here for individual instance methods that may contain the information you're after.
to_sorinspect