Design log queries and a buffered writer | Datadog