Discover & main tracing

This commit is contained in:
Jakob Borg
2014-03-09 09:15:36 +01:00
parent 52ee7d5724
commit 2553ba0463
5 changed files with 73 additions and 57 deletions

View File

@@ -4,7 +4,6 @@ import (
"bytes"
"errors"
"fmt"
"log"
"os"
"path"
"sync"
@@ -26,8 +25,8 @@ type fileMonitor struct {
}
func (m *fileMonitor) FileBegins(cc <-chan content) error {
if m.model.trace["file"] {
log.Printf("FILE: FileBegins: " + m.name)
if debugPull {
dlog.Println("file begins:", m.name)
}
tmp := defTempNamer.TempName(m.path)
@@ -110,8 +109,8 @@ func (m *fileMonitor) copyRemoteBlocks(cc <-chan content, outFile *os.File, writ
}
func (m *fileMonitor) FileDone() error {
if m.model.trace["file"] {
log.Printf("FILE: FileDone: " + m.name)
if debugPull {
dlog.Println("file done:", m.name)
}
m.writeDone.Wait()