Disallow logging timestamps without data

Nobody has come up with a good use case or a way to read the data
afterwards.  Until we have a use case, it isn't worth spending the
engineering figuring out how to expose this all.

Instead, when validating configs, enforce that we can't log timestamps
without data.  Logs with timestamps and no data are possible to read,
but need --skip_missing_forwarding_entries and are not recommended.

Change-Id: I04534a09cba1bb7f87c0e4e966a3e20ae2007568
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/configuration.cc b/aos/configuration.cc
index 2b9ac6d..a00c8e7 100644
--- a/aos/configuration.cc
+++ b/aos/configuration.cc
@@ -337,6 +337,19 @@
                    << ", can only use [-a-zA-Z0-9_/]";
       }
 
+      // There is no good use case today for logging timestamps but not the
+      // corresponding data.  Instead of plumbing through all of this on the
+      // reader side, let'd just disallow it for now.
+      if (c->logger() == LoggerConfig::NOT_LOGGED &&
+          c->has_destination_nodes()) {
+        for (const Connection *d : *c->destination_nodes()) {
+          CHECK(d->timestamp_logger() == LoggerConfig::NOT_LOGGED)
+              << ": Logging timestamps without data is not supported.  If you "
+                 "have a good use case, let's talk.  "
+              << CleanedChannelToString(c);
+        }
+      }
+
       // Make sure everything is sorted while we are here...  If this fails,
       // there will be a bunch of weird errors.
       if (last_channel != nullptr) {