Merge "Log request timing along with upstream server, for each forwarded query."
diff --git a/src/forward.c b/src/forward.c
index 51eeb15..7eb1b44 100644
--- a/src/forward.c
+++ b/src/forward.c
@@ -1292,7 +1292,18 @@
   daemon->log_source_addr = &source_addr;
   
   if (extract_request(header, (size_t)n, daemon->namebuff, &type))
-    {
+	{
+	  FILE *fp;
+	  fp = fopen("/tmp/dns_query_log.txt", "a");
+	  if (!fp)
+		{
+		  my_syslog(LOG_ERR, "failed to open /tmp/dns_query_log.txt: %s", strerror(errno));
+		}
+	  else
+		{
+		  fprintf(fp, "%lu %s\n", now, daemon->namebuff);
+		  fclose(fp);
+		}
 #ifdef HAVE_AUTH
       struct auth_zone *zone;
 #endif