add sdjournal interface to inject tests

The goal of the tests is not to test phosphor-logging, but rather allow
code to call through phosphor-logging/log<> during a test.

Change-Id: Id8c84ded473decc7f9f0be268116083093f86e54
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/sdjournal.cpp b/sdjournal.cpp
new file mode 100644
index 0000000..77ced46
--- /dev/null
+++ b/sdjournal.cpp
@@ -0,0 +1,21 @@
+#include "config.h"
+
+#include <phosphor-logging/sdjournal.hpp>
+
+namespace phosphor
+{
+namespace logging
+{
+
+SdJournalHandler sdjournal_impl;
+SdJournalHandler* sdjournal_ptr = &sdjournal_impl;
+
+SdJournalHandler* SwapJouralHandler(SdJournalHandler* with)
+{
+    SdJournalHandler* curr = sdjournal_ptr;
+    sdjournal_ptr = with;
+    return curr;
+}
+
+} // namespace logging
+} // namespace phosphor