Better logging

The previous logging logic broke when the message to be logged contained formatting characters i.e 'awsm product 20% off'.