Write logs during tests to a file.
authorCarl Hetherington <cth@carlh.net>
Tue, 18 Feb 2020 19:21:51 +0000 (20:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Feb 2020 19:21:51 +0000 (20:21 +0100)
test/test.cc

index 836e74f52753a66f525b92e291cb4eb7cd8c11a4..c0d5d776f17b89a0a00e738aa44a2f8526caee18 100644 (file)
@@ -35,6 +35,8 @@
 #include "lib/dcp_content_type.h"
 #include "lib/log_entry.h"
 #include "lib/compose.hpp"
 #include "lib/dcp_content_type.h"
 #include "lib/log_entry.h"
 #include "lib/compose.hpp"
+#include "lib/file_log.h"
+#include "lib/dcpomatic_log.h"
 #include "test.h"
 #include <dcp/dcp.h>
 #include <dcp/cpl.h>
 #include "test.h"
 #include <dcp/dcp.h>
 #include <dcp/cpl.h>
@@ -113,6 +115,8 @@ struct TestConfig
                if (env_private) {
                        private_data = env_private;
                }
                if (env_private) {
                        private_data = env_private;
                }
+
+               dcpomatic_log.reset (new FileLog("build/test/log"));
        }
 
        ~TestConfig ()
        }
 
        ~TestConfig ()