Convert log to a string