In a rake task if I use puts command then I see the output on console. However I will not see that message in log file when app is deployed on production.
Rake tasks are run by a user, on a command-line. Anything they need to know right away ("processed 5 rows") should be output on the terminal with puts.
Anything that needs to be kept for posterity ("sent warning email to jsmith@example.com") should be sent to the Rails.logger.