Fixes:
[fanfix.git] / src / be / nikiroo / fanfix / library / BasicLibrary.java
index 5bc8829af774346f1e7f10e257ff93148d0b0b13..56a57070b0e2ab66fb0d78d97a43c847ed2cc06d 100644 (file)
@@ -355,6 +355,7 @@ abstract public class BasicLibrary {
                                        if (type != null) {
                                                story = BasicSupport.getSupport(type, url) //
                                                                .process(pgProcess);
+
                                                // Because we do not want to clear the meta cache:
                                                meta.setCover(story.getMeta().getCover());
                                                story.setMeta(meta);
@@ -517,9 +518,10 @@ abstract public class BasicLibrary {
         */
        public synchronized Story save(Story story, String luid, Progress pg)
                        throws IOException {
-               
-               System.out.println("story before save: "+story);
-               
+
+               Instance.getTraceHandler().trace(
+                               this.getClass().getSimpleName() + ": saving story " + luid);
+
                // Do not change the original metadata, but change the original story
                MetaData meta = story.getMeta().clone();
                story.setMeta(meta);
@@ -535,10 +537,13 @@ abstract public class BasicLibrary {
                }
 
                story = doSave(story, pg);
-               System.out.println("story after save: "+story);
-               
+
                updateInfo(story.getMeta());
 
+               Instance.getTraceHandler().trace(
+                               this.getClass().getSimpleName() + ": story saved (" + luid
+                                               + ")");
+
                return story;
        }
 
@@ -552,8 +557,15 @@ abstract public class BasicLibrary {
         *             in case of I/O error
         */
        public synchronized void delete(String luid) throws IOException {
+               Instance.getTraceHandler().trace(
+                               this.getClass().getSimpleName() + ": deleting story " + luid);
+
                doDelete(luid);
                deleteInfo(luid);
+
+               Instance.getTraceHandler().trace(
+                               this.getClass().getSimpleName() + ": story deleted (" + luid
+                                               + ")");
        }
 
        /**