Enhance logging.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneInserter.java
index afd406f..1344a10 100644 (file)
@@ -111,7 +111,10 @@ public class SoneInserter extends AbstractService {
                                if (success) {
                                        synchronized (sone) {
                                                if (sone.getModificationCounter() == modificationCounter) {
+                                                       logger.log(Level.FINE, "Sone “%s” was not modified further, resetting counter…", new Object[] { sone });
                                                        sone.setModificationCounter(0);
+                                               } else {
+                                                       logger.log(Level.FINE, "Sone “%s” was modified since the insert started, starting another insert…", new Object[] { sone });
                                                }
                                        }
                                }
@@ -187,6 +190,9 @@ public class SoneInserter extends AbstractService {
                        /* first, create an index.html. */
                        manifestEntries.put("index.html", createManifestElement("index.html", "text/html; charset=utf-8", "/templates/insert/index.html"));
 
+                       /* now, store the sone. */
+                       manifestEntries.put("sone.xml", createManifestElement("sone.xml", "text/xml; charset=utf-8", "/templates/insert/sone.xml"));
+
                        return manifestEntries;
                }