Add middleware request logging for token testing to rails

Ruby

Add middleware request logging for token testing to rails