Add a little logging.
authorCarl Hetherington <cth@carlh.net>
Mon, 7 Oct 2019 21:50:54 +0000 (21:50 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 7 Oct 2019 21:50:54 +0000 (21:50 +0000)
src/lib/check_content_change_job.cc

index 468933ae496169a1601672bb527db6a01bdad4a3..0b52f414bfbc548943ecc7985dabedac91bc180e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2018-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -23,6 +23,7 @@
 #include "examine_content_job.h"
 #include "content.h"
 #include "film.h"
+#include "dcpomatic_log.h"
 #include <boost/foreach.hpp>
 #include <iostream>
 
@@ -63,11 +64,13 @@ CheckContentChangeJob::run ()
                bool ic = false;
                for (size_t j = 0; j < i->number_of_paths(); ++j) {
                        if (boost::filesystem::last_write_time(i->path(j)) != i->last_write_time(j)) {
+                               LOG_GENERAL("File %1 changed; last_write_time now %2, was %3", i->path(j).string(), boost::filesystem::last_write_time(i->path(j)), i->last_write_time(j));
                                ic = true;
                                break;
                        }
                }
                if (!ic && i->calculate_digest() != i->digest()) {
+                       LOG_GENERAL("Content %1 changed; digest now %2, was %3", i->path(0).string(), i->calculate_digest(), i->digest());
                        ic = true;
                }
                if (ic) {