lib/scanner: More sensible debug output (#8596)
Previous debug input didn't really give enough info to show what was happening, while it also printed full block lists which are enormously verbose. Now it consistently prints 1. what it sees on disk, 2. what it got from CurrentFile (without blocks), 3. the action taken on that file.
This commit is contained in:
@@ -98,6 +98,8 @@ func (ph *parallelHasher) hashFiles(ctx context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
l.Debugln("started hashing:", f)
|
||||
|
||||
if f.IsDirectory() || f.IsDeleted() {
|
||||
panic("Bug. Asked to hash a directory or a deleted file.")
|
||||
}
|
||||
@@ -120,6 +122,7 @@ func (ph *parallelHasher) hashFiles(ctx context.Context) {
|
||||
f.Size += int64(b.Size)
|
||||
}
|
||||
|
||||
l.Debugln("completed hashing:", f)
|
||||
select {
|
||||
case ph.outbox <- ScanResult{File: f}:
|
||||
case <-ctx.Done():
|
||||
|
||||
Reference in New Issue
Block a user