Untangle and clean up the logging code

It was a mess before because of a combination of having code split out
for cRIO vs Linux and cruft.

Change-Id: Id282e1a7f7988be0441c669a573a5d022ed41fb9
diff --git a/aos/linux_code/BUILD b/aos/linux_code/BUILD
index b0c88b5..7adb3d6 100644
--- a/aos/linux_code/BUILD
+++ b/aos/linux_code/BUILD
@@ -7,6 +7,7 @@
   ],
   deps = [
     '//aos/common/logging',
+    '//aos/common/logging:implementations',
     '//aos/common:time',
   ],
 )
@@ -58,7 +59,7 @@
   deps = [
     '//aos/linux_code/ipc_lib:shared_mem',
     '//aos/common:die',
-    '//aos/common/logging:linux_logging',
+    '//aos/common/logging:implementations',
   ],
 )
 
diff --git a/aos/linux_code/dump_rtprio.cc b/aos/linux_code/dump_rtprio.cc
index cae69f1..2bfb9c1 100644
--- a/aos/linux_code/dump_rtprio.cc
+++ b/aos/linux_code/dump_rtprio.cc
@@ -17,7 +17,7 @@
 #include <string>
 
 #include "aos/common/logging/logging.h"
-#include "aos/common/logging/logging_impl.h"
+#include "aos/common/logging/implementations.h"
 #include "aos/common/time.h"
 
 namespace {
diff --git a/aos/linux_code/init.cc b/aos/linux_code/init.cc
index cf54fb9..80c71e3 100644
--- a/aos/linux_code/init.cc
+++ b/aos/linux_code/init.cc
@@ -14,7 +14,7 @@
 #include <malloc.h>
 
 #include "aos/common/die.h"
-#include "aos/common/logging/linux_logging.h"
+#include "aos/common/logging/implementations.h"
 #include "aos/linux_code/ipc_lib/shared_mem.h"
 
 namespace FLAG__namespace_do_not_use_directly_use_DECLARE_double_instead {
@@ -27,7 +27,7 @@
 namespace logging {
 namespace internal {
 
-// Implemented in aos/common/logging/linux_interface.cc.
+// Implemented in aos/common/logging/context.cc.
 void ReloadThreadName();
 
 }  // namespace internal
@@ -98,13 +98,13 @@
 void InitNRT() {
   InitStart();
   aos_core_create_shared_mem(false, false);
-  logging::linux_code::Register();
+  logging::RegisterQueueImplementation();
 }
 
 void InitCreate() {
   InitStart();
   aos_core_create_shared_mem(true, false);
-  logging::linux_code::Register();
+  logging::RegisterQueueImplementation();
 }
 
 void Init(int relative_priority) {
@@ -133,7 +133,7 @@
 
   InitStart();
   aos_core_create_shared_mem(false, realtime);
-  logging::linux_code::Register();
+  logging::RegisterQueueImplementation();
 }
 
 void Cleanup() {
diff --git a/aos/linux_code/ipc_lib/BUILD b/aos/linux_code/ipc_lib/BUILD
index 2b90c34..8f26882 100644
--- a/aos/linux_code/ipc_lib/BUILD
+++ b/aos/linux_code/ipc_lib/BUILD
@@ -9,7 +9,7 @@
     'aos_sync.h',
   ],
   deps = [
-    '//aos/common/logging:logging_interface',
+    '//aos/common/logging',
     '//aos/common:once',
     '//aos/common:macros',
   ],
@@ -41,7 +41,7 @@
     ':aos_sync',
     ':core_lib',
     ':shared_mem_types',
-    '//aos/common/logging:logging_interface',
+    '//aos/common/logging',
     '//debian:librt',
   ],
 )
@@ -71,7 +71,7 @@
     '//aos/common:mutex',
     ':core_lib',
     ':shared_mem',
-    '//aos/common/logging:logging_interface',
+    '//aos/common/logging',
     '//debian:librt',
     '//aos/common/util:options',
   ],
diff --git a/aos/linux_code/starter/BUILD b/aos/linux_code/starter/BUILD
index 5e3ac38..ec6ce7f 100644
--- a/aos/linux_code/starter/BUILD
+++ b/aos/linux_code/starter/BUILD
@@ -17,6 +17,7 @@
     '//aos/linux_code:init',
     '//third_party/libevent',
     '//aos/common/logging',
+    '//aos/common/logging:implementations',
     '//aos/common:once',
     '//aos/common:time',
     '//aos/common/libc:aos_strsignal',
diff --git a/aos/linux_code/starter/starter.cc b/aos/linux_code/starter/starter.cc
index a2545c2..855653d 100644
--- a/aos/linux_code/starter/starter.cc
+++ b/aos/linux_code/starter/starter.cc
@@ -30,7 +30,7 @@
 #include "third_party/libevent/event.h"
 
 #include "aos/common/logging/logging.h"
-#include "aos/common/logging/logging_impl.h"
+#include "aos/common/logging/implementations.h"
 #include "aos/linux_code/init.h"
 #include "aos/common/unique_malloc_ptr.h"
 #include "aos/common/time.h"