Author: toad
Date: 2008-10-10 12:48:14 +0000 (Fri, 10 Oct 2008)
New Revision: 22980

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
   branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java
Log:
Logging


Modified: 
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java     
2008-10-10 12:47:36 UTC (rev 22979)
+++ branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java     
2008-10-10 12:48:14 UTC (rev 22980)
@@ -138,6 +138,8 @@
                        shouldSend = (resultingURI == null);
                        resultingURI = block.getClientKey().getURI();
                }
+               if(logMINOR)
+                       Logger.minor(this, "Encoded "+resultingURI+" for 
"+this+" shouldSend="+shouldSend+" dontSendEncoded="+dontSendEncoded);
                if(shouldSend && !dontSendEncoded)
                        cb.onEncode(block.getClientKey(), this, container, 
context);
                if(shouldSend && persistent)
@@ -324,6 +326,7 @@
                        container.store(this);
                }
                parent.completedBlock(false, container, context);
+               if(logMINOR) Logger.minor(this, "Calling onSuccess for "+cb);
                cb.onSuccess(this, container, context);
        }


Modified: 
branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java    
    2008-10-10 12:47:36 UTC (rev 22979)
+++ 
branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java    
    2008-10-10 12:48:14 UTC (rev 22980)
@@ -615,6 +615,7 @@
                ClientCHK key = (ClientCHK) k;
                SingleBlockInserter sbi = (SingleBlockInserter) state;
                int x = sbi.token;
+               if(logMINOR) Logger.minor(this, "Encoded block "+x+" on 
"+this+" : "+sbi);
                synchronized (this) {
                        if (finished)
                                return;
@@ -632,6 +633,8 @@
                        blocksGotURI++;
                        if(persistent)
                                container.store(this);
+                       if(logMINOR)
+                               Logger.minor(this, "Blocks got URI: 
"+blocksGotURI+" of "+(dataBlocks.length + checkBlocks.length));
                        if (blocksGotURI != dataBlocks.length + 
checkBlocks.length)
                                return;
                        // Double check


Reply via email to