changed logging function to take abritrary number of arguments