Adding logging

This commit is contained in:
Alex Yatskov 2015-05-25 14:13:33 +09:00
parent 5b55310dd7
commit 5e10b3d8c1
3 changed files with 7 additions and 0 deletions

3
dir.go
View File

@ -26,6 +26,7 @@ import (
"bazil.org/fuse" "bazil.org/fuse"
"bazil.org/fuse/fs" "bazil.org/fuse/fs"
"golang.org/x/net/context" "golang.org/x/net/context"
"log"
"os" "os"
"path" "path"
) )
@ -81,6 +82,8 @@ func (this *versionedDir) createFile(name string, flags int) (*versionedFile, er
file := newVersionedFile(node, this) file := newVersionedFile(node, this)
file.handle = handle file.handle = handle
log.Printf("createFile: %s => %v", childPath, file.node.info.Size())
this.files[name] = file this.files[name] = file
return file, nil return file, nil
} }

View File

@ -27,6 +27,7 @@ import (
"bazil.org/fuse/fs" "bazil.org/fuse/fs"
"errors" "errors"
"golang.org/x/net/context" "golang.org/x/net/context"
"log"
"os" "os"
) )
@ -83,6 +84,8 @@ func (this *versionedFile) Setattr(ctx context.Context, req *fuse.SetattrRequest
return err return err
} }
log.Printf("Setattr: %s => %v", this.node.path, req)
this.node.info = info this.node.info = info
this.Attr(&resp.Attr) this.Attr(&resp.Attr)
return nil return nil

View File

@ -1 +1,2 @@
Blahblahblah Blahblahblah
bobobo