Log to stdout in DCPOMATIC_DEBUG.
authorCarl Hetherington <cth@carlh.net>
Thu, 15 Oct 2015 11:03:30 +0000 (12:03 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 15 Oct 2015 11:03:30 +0000 (12:03 +0100)
src/lib/log.cc

index 0f7a59ff84b598f9b997ad0cd7ca9b29019c55b7..d4f469602065bc3f3776f26a87a1538c440b01aa 100644 (file)
@@ -32,6 +32,7 @@
 #include "i18n.h"
 
 using std::string;
+using std::cout;
 using boost::shared_ptr;
 
 Log::Log ()
@@ -69,7 +70,13 @@ Log::log (string message, int type)
                return;
        }
 
-       do_log (shared_ptr<const LogEntry> (new StringLogEntry (type, message)));
+       shared_ptr<StringLogEntry> e (new StringLogEntry (type, message));
+
+#ifdef DCPOMATIC_DEBUG
+       cout << e->get() << "\n";
+#endif
+
+       do_log (e);
 }
 
 void