Cleanup logging code.