Apply log_queries function to Nitesi objects as well.