Clear the log rather than creating a new one.

Clearing can be done with the lock held, avoiding a race if
other goroutines are concurrently writing.