remove newlines from query in logs