Merge //aos/linux_code/logging into //aos/common/logging

Shuffling files+targets to clean it up further is coming next.

Change-Id: Iae716b07b340a66502f8e0964281c10fae0fcb7a
diff --git a/aos/common/logging/linux_logging.h b/aos/common/logging/linux_logging.h
new file mode 100644
index 0000000..3f74fa8
--- /dev/null
+++ b/aos/common/logging/linux_logging.h
@@ -0,0 +1,34 @@
+#ifndef AOS_COMMON_LOGGING_LINUX_LOGGING_H_
+#define AOS_COMMON_LOGGING_LINUX_LOGGING_H_
+
+#include "aos/common/logging/logging_impl.h"
+#include "aos/common/util/options.h"
+
+namespace aos {
+
+class RawQueue;
+
+namespace logging {
+namespace linux_code {
+
+// Calls AddImplementation to register the usual linux logging implementation
+// which sends the messages through a queue. This implementation relies on
+// another process(es) to read the log messages that it puts into the queue.
+// This function is usually called by aos::Init*.
+void Register();
+
+// Fairly simple wrappers around the raw queue calls.
+
+// This one never returns NULL if flags contains BLOCK.
+const LogMessage *ReadNext(Options<RawQueue> flags);
+const LogMessage *ReadNext(Options<RawQueue> flags, int *index);
+const LogMessage *ReadNext();
+LogMessage *Get();
+void Free(const LogMessage *msg);
+void Write(LogMessage *msg);
+
+}  // namespace linux_code
+}  // namespace logging
+}  // namespace aos
+
+#endif  // AOS_COMMON_LOGGING_LINUX_LOGGING_H_