Clean log code