jacobsa / fuse

A Go package for implementing a FUSE file system.
Apache License 2.0
478 stars 106 forks source link

Improving fuse response log for better debuggability #165

Closed raj-prince closed 6 days ago

raj-prince commented 1 week ago

Currently, fuse response log OK () is pretty generic. Replacing the OK with operation name. This is specially useful in knowing if a particular operation ReadFile or LookUpInode is happening in parallel.

Before

time="25/06/2024 03:05:52.093580" severity=TRACE message="fuse_debug: Op 0x00000160        connection.go:420] <- LookUpInode (parent 1, name \"b.txt\", PID 870932)"

time="25/06/2024 03:05:52.093777" severity=TRACE message="fuse_debug: Op 0x00000160        connection.go:513] -> OK (inode 2)"

After

time="25/06/2024 03:03:45.288441" severity=TRACE message="fuse_debug: Op 0x0000015c        connection.go:420] <- LookUpInode (parent 1, name \"b.txt\", PID 869418)"

time="25/06/2024 03:03:45.505412" severity=TRACE message="fuse_debug: Op 0x0000015c        connection.go:513] -> LookUpInode (inode 3)"