Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#5873] feat(gvfs-fuse): add debug log for FuseApiHandle #5905

Open
wants to merge 44 commits into
base: main
Choose a base branch
from

Conversation

unknowntpo
Copy link
Contributor

@unknowntpo unknowntpo commented Dec 18, 2024

What changes were proposed in this pull request?

Implement FuseApiHandleDebug so we can log all input arguments and return values of FuseApiHandle.
I use tracing::debug, tracing::error with structure logging to format the message in key value pair format, so we don't need to control format manually.

e.g.

        debug!(req.unique, ?req, parent = ?parent_stat.name, ?name, "lookup started");

And user can set fuse_debug = true in [fuse] section at config file like gvfs_fuse_memory.toml to decide whether they need fuse debug logging or not.

Fix: #5873

Does this PR introduce any user-facing change?

No.

How was this patch tested?

tested with fuse_test.rs, along with MemoryFileSystem.

Now, FuseApiHandleDebug will wrap FuseApiHandle and log all input arguments and returned values, if return value is Result, we use match to extract and log the status of result, note that error will be logged if occured.

To test this PR, set fuse_debug = true in gvfs_fuse_memory.toml and run:

cd ./clients/filesystem-fuse
RUST_LOG=gvfs_fuse::fuse_api_handle=debug make test

Here's some example logging generated by test_fuse_system_with_auto in fuse_test.rs:

2025-01-16T02:59:13.860193Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=4 req=Request { unique: 4, uid: 501, gid: 20, pid: 430 } parent="" name="._."
2025-01-16T02:59:13.860211Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=4 e=Errno(2)
2025-01-16T02:59:13.860371Z DEBUG gvfs_fuse::fuse_api_handle_debug: statfs started req.unique=5 req=Request { unique: 5, uid: 501, gid: 20, pid: 430 } filename=""
2025-01-16T02:59:13.860382Z DEBUG gvfs_fuse::fuse_api_handle_debug: statfs completed req.unique=5 reply=ReplyStatFs { blocks: 1000000, bfree: 1000000, bavail: 1000000, files: 1000000, ffree: 1000000, bsize: 4096, namelen: 255, frsize: 4096 }

...

2025-01-16T02:59:14.840096Z DEBUG gvfs_fuse::fuse_api_handle_debug: setattr started req.unique=2 req=Request { unique: 2, uid: 501, gid: 20, pid: 22343 } filename="test_create" fh=Some(1) set_attr=SetAttr { mode: None, uid: None, gid: None, size: Some(0), lock_owner: None, atime: None, mtime: None, ctime: None, crtime: None, chgtime: None, bkuptime: None, flags: None }
2025-01-16T02:59:14.840243Z DEBUG gvfs_fuse::fuse_api_handle_debug: setattr completed req.unique=2 reply=ttl: 1s, FileAttr: { ino: 10000, size: 0, blocks: 0, atime: "2025-01-16 02:59:14.840213", mtime: "2025-01-16 02:59:14.840213", ctime: "2025-01-16 02:59:14.840213", crtime: "2025-01-16 02:59:14.840213", kind: RegularFile, perm: 600, nlink: 1, uid: 501, gid: 20, rdev: 0, flags: 0, blksize: 8192 }

...

@unknowntpo unknowntpo force-pushed the feat-fuse-debug-log branch 2 times, most recently from 9ae9ea0 to 3574bce Compare December 19, 2024 22:48
@unknowntpo unknowntpo marked this pull request as ready for review December 19, 2024 22:52
Copy link
Contributor

@diqiu50 diqiu50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally, we need to verify the log format to see if it meets expectations. This needs to be validated in the #5886, and you can wait for it to be merged.

clients/filesystem-fuse/src/fuse_api_handle.rs Outdated Show resolved Hide resolved
}

impl<T: RawFileSystem> Filesystem for FuseApiHandleDebug<T> {
async fn init(&self, req: Request) -> fuse3::Result<ReplyInit> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to implement all interfaces of the Filesystem. If they are not implemented yet, an error log should be recorded.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you implement all the Filesystem interfaces?

clients/filesystem-fuse/src/fuse_api_handle.rs Outdated Show resolved Hide resolved
clients/filesystem-fuse/src/fuse_api_handle.rs Outdated Show resolved Hide resolved
@diqiu50
Copy link
Contributor

diqiu50 commented Dec 20, 2024

Please refer to other PRs for the format of PR titles and descriptions.

@unknowntpo unknowntpo changed the title Feat fuse debug log [#5873] feat(gvfs-fuse): add debug log for FuseApiHandle Dec 20, 2024
@unknowntpo
Copy link
Contributor Author

unknowntpo commented Dec 26, 2024

Finally, we need to verify the log format to see if it meets expectations. This needs to be validated in the #5886, and you can wait for it to be merged.

Since #5886 is done, I'll continue on my work.

@unknowntpo
Copy link
Contributor Author

close and reopen to run workflow

@unknowntpo unknowntpo closed this Dec 29, 2024
@unknowntpo unknowntpo reopened this Dec 29, 2024
@xunliu
Copy link
Member

xunliu commented Dec 30, 2024

@diqiu50 Please help review this PR, Thanks.

"readdir [id={}]: req: {:?}, parent: {:?}, fh: {:?}, offset: {:?}",
req.unique, req, parent, fh, offset
);
let result = self.inner.readdir(req, parent, fh, offset).await;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to show dir entries

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

req.unique,
FileAttrDebug {
file_attr: &reply.attr
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constructing an object is not as clear as using a function like to_desc_string()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented some methods like reply_attr_to_desc_str, reply_entry_to_desc_str to manually control the format.

Copy link
Contributor

@diqiu50 diqiu50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, there is no issue. The readability of the logs needs to be improved and made more concise. Unimportant information can be ignored.

Implement a few methods for printing commonly used structures, without having to print them in the struct format

clients/filesystem-fuse/src/fuse_api_handle.rs Outdated Show resolved Hide resolved
@unknowntpo unknowntpo force-pushed the feat-fuse-debug-log branch from 1d9ff8a to d619db0 Compare January 3, 2025 02:39
@diqiu50
Copy link
Contributor

diqiu50 commented Jan 6, 2025

@unknowntpo All the code are merged to the main brach. you need to merge the pr to main

@unknowntpo
Copy link
Contributor Author

@diqiu50 Okay, (I'm still working this PR)

@unknowntpo unknowntpo force-pushed the feat-fuse-debug-log branch 2 times, most recently from d4627de to ec48523 Compare January 7, 2025 23:14
@unknowntpo unknowntpo changed the base branch from branch-gvfs-fuse-dev to main January 7, 2025 23:17
@unknowntpo unknowntpo force-pushed the feat-fuse-debug-log branch 2 times, most recently from 479e7be to 87e01ff Compare January 10, 2025 22:57
@unknowntpo
Copy link
Contributor Author

Note that I use tracing::debug, tracing::error with structure logging to format the message in key value pair format, so we don't need to control format manually.

e.g.

    debug!(req.unique, ?req, parent = ?parent_stat.name, ?name, "lookup started");

@unknowntpo
Copy link
Contributor Author

@diqiu50 Done, please take a look.

@@ -46,6 +47,7 @@ opendal = { version = "0.46.0", features = ["services-s3"] }
reqwest = { version = "0.12.9", features = ["json"] }
serde = { version = "1.0.216", features = ["derive"] }
tokio = { version = "1.38.0", features = ["full"] }
tracing = "0.1.41"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to use tracing instead of log, please remove log.

@@ -20,6 +20,7 @@
file_mask = 0o600
dir_mask = 0o700
fs_type = "memory"
fuse_debug=true

Copy link
Contributor

@diqiu50 diqiu50 Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the format

@@ -265,6 +265,8 @@ pub struct FuseConfig {
#[serde(default)]
pub fs_type: String,
#[serde(default)]
pub fuse_debug: bool,
#[serde(default)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to handle default value like other configurations.

@@ -53,7 +53,7 @@ impl<T: RawFileSystem> FuseApiHandle<T> {
}
}

async fn get_modified_file_stat(
pub async fn get_modified_file_stat(
&self,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use this function to retrieve the file name. use the RawFileSystem::get_file_path


/// Convert `ReplyAttr` to descriptive string.
///
/// Example: `ttl: 1s, FileAttr: { ino: 10000, size: 0, blocks: 0, atime: "2025-01-16 02:42:52.600436", mtime: "2025-01-16 02:42:52.600436", ctime: "2025-01-16 02:42:52.600436", crtime: "2025-01-16 02:42:52.600436", kind: RegularFile, perm: 600, nlink: 1, uid: 501, gid: 20, rdev: 0, flags: 0, blksize: 8192 }`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is too long , you can format it like this.

/// Example: `ttl: 1s, FileAttr: { ino: 10000, size: 0, blocks: 0, atime: "2025-01-16 02:42:52.600436", 
///      mtime: "2025-01-16 02:42:52.600436", ctime: "2025-01-16 02:42:52.600436", crtime: "2025-01-16 
///     02:42:52.600436", kind: RegularFile, perm: 600, nlink: 1, uid: 501, gid: 20, rdev: 0, flags: 0, blksize: 8192 }`


/// Convert `ReplyAttr` to descriptive string.
///
/// Example: `ttl: 1s, FileAttr: { ino: 10000, size: 0, blocks: 0, atime: "2025-01-16 02:42:52.600436", mtime: "2025-01-16 02:42:52.600436", ctime: "2025-01-16 02:42:52.600436", crtime: "2025-01-16 02:42:52.600436", kind: RegularFile, perm: 600, nlink: 1, uid: 501, gid: 20, rdev: 0, flags: 0, blksize: 8192 }`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is too long , you can format it like this.

/// Example: `ttl: 1s, FileAttr: { ino: 10000, size: 0, blocks: 0, atime: "2025-01-16 02:42:52.600436", 
///      mtime: "2025-01-16 02:42:52.600436", ctime: "2025-01-16 02:42:52.600436", crtime: "2025-01-16 
///     02:42:52.600436", kind: RegularFile, perm: 600, nlink: 1, uid: 501, gid: 20, rdev: 0, flags: 0, blksize: 8192 }`

file_attr_to_desc_str(&reply_attr.attr)
)
.unwrap();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is better like this:

    write!(output, "ttl: {:?}, FileAttr: {}, generation: {}", 
        reply_entry.ttl, 
        file_attr_to_desc_str(&reply_entry.attr), 
        reply_entry.generation).unwrap();

.inner
.get_modified_file_stat(parent, Option::None, Option::None, Option::None)
.await?;
debug!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the debug code readable.
like :
debug!("format string", x1, x2, x3)

self.inner.readdirplus(req, parent, fh, offset, lock_owner),
"readdirplus",
req
)
Copy link
Contributor

@diqiu50 diqiu50 Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you print the child DirectoryEntry in the log?

@diqiu50
Copy link
Contributor

diqiu50 commented Jan 16, 2025

2025-01-16T08:22:33.123544Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=6 req=Request { unique: 6, uid: 1000, gid: 1000, pid: 52525 } filename="" fh=None flags=0
2025-01-16T08:22:33.124241Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=6 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:22:33.124094186", mtime: "2025-01-16 08:22:33.124094186", ctime: "2025-01-16 08:22:33.124094186", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:22:37.450601Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=8 req=Request { unique: 8, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:22:37.450703Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=8 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:22:37.450669378", mtime: "2025-01-16 08:22:37.450669378", ctime: "2025-01-16 08:22:37.450669378", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:22:58.586380Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=12 req=Request { unique: 12, uid: 1000, gid: 1000, pid: 52567 } dirname="" flags=100352
2025-01-16T08:22:58.586514Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=12 reply=ReplyOpen { fh: 1, flags: 100352 }
2025-01-16T08:22:58.586744Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=14 req=Request { unique: 14, uid: 1000, gid: 1000, pid: 52567 } filename="" fh=None flags=0
2025-01-16T08:22:58.586815Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=14 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:22:58.586782325", mtime: "2025-01-16 08:22:58.586782325", ctime: "2025-01-16 08:22:58.586782325", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:22:58.587054Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=16 req=Request { unique: 16, uid: 1000, gid: 1000, pid: 52567 } parent=1 fh=1 offset=0 lock_owner=0
2025-01-16T08:22:58.587117Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=16
2025-01-16T08:22:58.587846Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=20 req=Request { unique: 20, uid: 1000, gid: 1000, pid: 52567 } parent=1 fh=1 offset=3 lock_owner=0
2025-01-16T08:22:58.587914Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=20
2025-01-16T08:22:58.588132Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=22 req=Request { unique: 22, uid: 0, gid: 0, pid: 0 } dirname="" fh=1 flags=100352
2025-01-16T08:22:58.588192Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=22
2025-01-16T08:23:49.754919Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=24 req=Request { unique: 24, uid: 1000, gid: 1000, pid: 34160 } parent="" name="e"
2025-01-16T08:23:49.754998Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=24 e=Errno(2)
2025-01-16T08:23:49.755206Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=26 req=Request { unique: 26, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:23:49.755284Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=26 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:49.755245615", mtime: "2025-01-16 08:23:49.755245615", ctime: "2025-01-16 08:23:49.755245615", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:49.755502Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=28 req=Request { unique: 28, uid: 1000, gid: 1000, pid: 34160 } dirname="" flags=100352
2025-01-16T08:23:49.755570Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=28 reply=ReplyOpen { fh: 2, flags: 100352 }
2025-01-16T08:23:49.755720Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=30 req=Request { unique: 30, uid: 1000, gid: 1000, pid: 34160 } parent=1 fh=2 offset=0 lock_owner=0
2025-01-16T08:23:49.755783Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=30
2025-01-16T08:23:49.756008Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir started req.unique=32 req=Request { unique: 32, uid: 1000, gid: 1000, pid: 34160 } parent="" fh=2 offset=3
2025-01-16T08:23:49.756062Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir completed req.unique=32
2025-01-16T08:23:49.756224Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=34 req=Request { unique: 34, uid: 0, gid: 0, pid: 0 } dirname="" fh=2 flags=100352
2025-01-16T08:23:49.756276Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=34
2025-01-16T08:23:50.030911Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=36 req=Request { unique: 36, uid: 1000, gid: 1000, pid: 34160 } parent="" name="ec"
2025-01-16T08:23:50.030982Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=36 e=Errno(2)
2025-01-16T08:23:50.031746Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=38 req=Request { unique: 38, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:23:50.031854Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=38 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:50.031796597", mtime: "2025-01-16 08:23:50.031796597", ctime: "2025-01-16 08:23:50.031796597", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:50.032111Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=40 req=Request { unique: 40, uid: 1000, gid: 1000, pid: 34160 } dirname="" flags=100352
2025-01-16T08:23:50.032182Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=40 reply=ReplyOpen { fh: 3, flags: 100352 }
2025-01-16T08:23:50.032409Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=42 req=Request { unique: 42, uid: 1000, gid: 1000, pid: 34160 } parent=1 fh=3 offset=0 lock_owner=0
2025-01-16T08:23:50.032478Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=42
2025-01-16T08:23:50.032677Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir started req.unique=44 req=Request { unique: 44, uid: 1000, gid: 1000, pid: 34160 } parent="" fh=3 offset=3
2025-01-16T08:23:50.032729Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir completed req.unique=44
2025-01-16T08:23:50.032980Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=46 req=Request { unique: 46, uid: 0, gid: 0, pid: 0 } dirname="" fh=3 flags=100352
2025-01-16T08:23:50.033038Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=46
2025-01-16T08:23:50.094013Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=48 req=Request { unique: 48, uid: 1000, gid: 1000, pid: 34160 } parent="" name="ech"
2025-01-16T08:23:50.094090Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=48 e=Errno(2)
2025-01-16T08:23:50.094319Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=50 req=Request { unique: 50, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:23:50.094398Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=50 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:50.094358581", mtime: "2025-01-16 08:23:50.094358581", ctime: "2025-01-16 08:23:50.094358581", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:50.094629Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=52 req=Request { unique: 52, uid: 1000, gid: 1000, pid: 34160 } dirname="" flags=100352
2025-01-16T08:23:50.094698Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=52 reply=ReplyOpen { fh: 4, flags: 100352 }
2025-01-16T08:23:50.094870Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=54 req=Request { unique: 54, uid: 1000, gid: 1000, pid: 34160 } parent=1 fh=4 offset=0 lock_owner=0
2025-01-16T08:23:50.094937Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=54
2025-01-16T08:23:50.095122Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir started req.unique=56 req=Request { unique: 56, uid: 1000, gid: 1000, pid: 34160 } parent="" fh=4 offset=3
2025-01-16T08:23:50.095174Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir completed req.unique=56
2025-01-16T08:23:50.095337Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=58 req=Request { unique: 58, uid: 0, gid: 0, pid: 0 } dirname="" fh=4 flags=100352
2025-01-16T08:23:50.095391Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=58
2025-01-16T08:23:50.744129Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=60 req=Request { unique: 60, uid: 1000, gid: 1000, pid: 34160 } parent="" name="ssss"
2025-01-16T08:23:50.744198Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=60 e=Errno(2)
2025-01-16T08:23:50.744402Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=62 req=Request { unique: 62, uid: 1000, gid: 1000, pid: 34160 } parent="" name="ssss"
2025-01-16T08:23:50.744445Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=62 e=Errno(2)
2025-01-16T08:23:50.744850Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=64 req=Request { unique: 64, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:23:50.744936Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=64 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:50.744894379", mtime: "2025-01-16 08:23:50.744894379", ctime: "2025-01-16 08:23:50.744894379", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:50.745861Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=66 req=Request { unique: 66, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a9.txt"
2025-01-16T08:23:50.745914Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=66 e=Errno(2)
2025-01-16T08:23:50.746196Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=68 req=Request { unique: 68, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a9.txt"
2025-01-16T08:23:50.746253Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=68 e=Errno(2)
2025-01-16T08:23:50.746599Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=70 req=Request { unique: 70, uid: 1000, gid: 1000, pid: 34160 } dirname="" flags=100352
2025-01-16T08:23:50.746669Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=70 reply=ReplyOpen { fh: 5, flags: 100352 }
2025-01-16T08:23:50.746870Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=72 req=Request { unique: 72, uid: 1000, gid: 1000, pid: 34160 } parent=1 fh=5 offset=0 lock_owner=0
2025-01-16T08:23:50.746945Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=72
2025-01-16T08:23:50.747146Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir started req.unique=74 req=Request { unique: 74, uid: 1000, gid: 1000, pid: 34160 } parent="" fh=5 offset=3
2025-01-16T08:23:50.747199Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir completed req.unique=74
2025-01-16T08:23:50.747496Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=76 req=Request { unique: 76, uid: 0, gid: 0, pid: 0 } dirname="" fh=5 flags=100352
2025-01-16T08:23:50.747606Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=76
2025-01-16T08:23:51.017231Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=78 req=Request { unique: 78, uid: 1000, gid: 1000, pid: 34160 } parent="" name="ssss"
2025-01-16T08:23:51.017303Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=78 e=Errno(2)
2025-01-16T08:23:51.017708Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=80 req=Request { unique: 80, uid: 1000, gid: 1000, pid: 34160 } parent="" name="ssss"
2025-01-16T08:23:51.017763Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=80 e=Errno(2)
2025-01-16T08:23:51.018182Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=82 req=Request { unique: 82, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:23:51.018263Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=82 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:51.018221815", mtime: "2025-01-16 08:23:51.018221815", ctime: "2025-01-16 08:23:51.018221815", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:51.019777Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=84 req=Request { unique: 84, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a9.txt"
2025-01-16T08:23:51.019839Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=84 e=Errno(2)
2025-01-16T08:23:51.020094Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=86 req=Request { unique: 86, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a9.txt"
2025-01-16T08:23:51.020138Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=86 e=Errno(2)
2025-01-16T08:23:51.022807Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=88 req=Request { unique: 88, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a9.txt"
2025-01-16T08:23:51.022880Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=88 e=Errno(2)
2025-01-16T08:23:51.023158Z DEBUG gvfs_fuse::fuse_api_handle_debug: create started req.unique=90 req=Request { unique: 90, uid: 1000, gid: 1000, pid: 34160 } parent="" filename="a9.txt" mode=33204 flags=33345
2025-01-16T08:23:51.023342Z DEBUG gvfs_fuse::fuse_api_handle_debug: create completed req.unique=90 reply=ttl: 1s, FileAttr: { ino: 10000, size: 0, blocks: 1, atime: "2025-01-16 08:23:51.023299722", mtime: "2025-01-16 08:23:51.023299722", ctime: "2025-01-16 08:23:51.023299722", kind: RegularFile, perm: 600, nlink: 0, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }, generation: 0, fh: 6
2025-01-16T08:23:51.023845Z DEBUG gvfs_fuse::fuse_api_handle_debug: write started req.unique=94 req=Request { unique: 94, uid: 1000, gid: 1000, pid: 34160 } filename="a9.txt" fh=6 offset=0 data_len=5 write_flags=6 flags=32769
2025-01-16T08:23:51.023931Z DEBUG gvfs_fuse::fuse_api_handle_debug: write completed req.unique=94
2025-01-16T08:23:51.024117Z DEBUG gvfs_fuse::fuse_api_handle_debug: release started req.unique=96 req=Request { unique: 96, uid: 0, gid: 0, pid: 0 } pathname="a9.txt" fh=6 flags=32769 lock_owner=0 flush=false
2025-01-16T08:23:51.024177Z DEBUG gvfs_fuse::fuse_api_handle_debug: release completed req.unique=96
2025-01-16T08:23:58.222960Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=98 req=Request { unique: 98, uid: 1000, gid: 1000, pid: 52642 } dirname="" flags=100352
2025-01-16T08:23:58.223091Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=98 reply=ReplyOpen { fh: 7, flags: 100352 }
2025-01-16T08:23:58.223472Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=100 req=Request { unique: 100, uid: 1000, gid: 1000, pid: 52642 } filename="" fh=None flags=0
2025-01-16T08:23:58.223652Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=100 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:58.223518752", mtime: "2025-01-16 08:23:58.223518752", ctime: "2025-01-16 08:23:58.223518752", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:58.224264Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=102 req=Request { unique: 102, uid: 1000, gid: 1000, pid: 52642 } parent=1 fh=7 offset=0 lock_owner=0
2025-01-16T08:23:58.224343Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=102
2025-01-16T08:23:58.224520Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=104 req=Request { unique: 104, uid: 1000, gid: 1000, pid: 52642 } parent=1 fh=7 offset=4 lock_owner=0
2025-01-16T08:23:58.224593Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=104
2025-01-16T08:23:58.224771Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=106 req=Request { unique: 106, uid: 0, gid: 0, pid: 0 } dirname="" fh=7 flags=100352
2025-01-16T08:23:58.224824Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=106
2025-01-16T08:23:58.737997Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=108 req=Request { unique: 108, uid: 1000, gid: 1000, pid: 34160 } parent="" name="c"
2025-01-16T08:23:58.738069Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=108 e=Errno(2)
2025-01-16T08:23:58.738921Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=110 req=Request { unique: 110, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:23:58.739007Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=110 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:58.738968201", mtime: "2025-01-16 08:23:58.738968201", ctime: "2025-01-16 08:23:58.738968201", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:58.739240Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=112 req=Request { unique: 112, uid: 1000, gid: 1000, pid: 34160 } dirname="" flags=100352
2025-01-16T08:23:58.739365Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=112 reply=ReplyOpen { fh: 8, flags: 100352 }
2025-01-16T08:23:58.739539Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=114 req=Request { unique: 114, uid: 1000, gid: 1000, pid: 34160 } parent=1 fh=8 offset=0 lock_owner=0
2025-01-16T08:23:58.739672Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=114
2025-01-16T08:23:58.739947Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir started req.unique=116 req=Request { unique: 116, uid: 1000, gid: 1000, pid: 34160 } parent="" fh=8 offset=4
2025-01-16T08:23:58.740064Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir completed req.unique=116
2025-01-16T08:23:58.740246Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=118 req=Request { unique: 118, uid: 0, gid: 0, pid: 0 } dirname="" fh=8 flags=100352
2025-01-16T08:23:58.740300Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=118
2025-01-16T08:23:58.860875Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=120 req=Request { unique: 120, uid: 1000, gid: 1000, pid: 34160 } parent="" name="ca"
2025-01-16T08:23:58.860953Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=120 e=Errno(2)
2025-01-16T08:23:58.861312Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=122 req=Request { unique: 122, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:23:58.861401Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=122 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:58.861353647", mtime: "2025-01-16 08:23:58.861353647", ctime: "2025-01-16 08:23:58.861353647", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:58.861700Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=124 req=Request { unique: 124, uid: 1000, gid: 1000, pid: 34160 } dirname="" flags=100352
2025-01-16T08:23:58.861765Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=124 reply=ReplyOpen { fh: 9, flags: 100352 }
2025-01-16T08:23:58.862052Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=126 req=Request { unique: 126, uid: 1000, gid: 1000, pid: 34160 } parent=1 fh=9 offset=0 lock_owner=0
2025-01-16T08:23:58.862274Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=126
2025-01-16T08:23:58.862473Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir started req.unique=128 req=Request { unique: 128, uid: 1000, gid: 1000, pid: 34160 } parent="" fh=9 offset=4
2025-01-16T08:23:58.862536Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir completed req.unique=128
2025-01-16T08:23:58.862760Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=130 req=Request { unique: 130, uid: 0, gid: 0, pid: 0 } dirname="" fh=9 flags=100352
2025-01-16T08:23:58.862818Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=130
2025-01-16T08:23:59.282746Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=132 req=Request { unique: 132, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a"
2025-01-16T08:23:59.282821Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=132 e=Errno(2)
2025-01-16T08:23:59.283476Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=134 req=Request { unique: 134, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a"
2025-01-16T08:23:59.283589Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=134 e=Errno(2)
2025-01-16T08:23:59.284050Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=136 req=Request { unique: 136, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:23:59.284266Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=136 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:59.284091613", mtime: "2025-01-16 08:23:59.284091613", ctime: "2025-01-16 08:23:59.284091613", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:59.284562Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=138 req=Request { unique: 138, uid: 1000, gid: 1000, pid: 34160 } dirname="" flags=100352
2025-01-16T08:23:59.284675Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=138 reply=ReplyOpen { fh: 10, flags: 100352 }
2025-01-16T08:23:59.285063Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=140 req=Request { unique: 140, uid: 1000, gid: 1000, pid: 34160 } parent=1 fh=10 offset=0 lock_owner=0
2025-01-16T08:23:59.285147Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=140
2025-01-16T08:23:59.285689Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir started req.unique=142 req=Request { unique: 142, uid: 1000, gid: 1000, pid: 34160 } parent="" fh=10 offset=4
2025-01-16T08:23:59.285792Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir completed req.unique=142
2025-01-16T08:23:59.286030Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=144 req=Request { unique: 144, uid: 0, gid: 0, pid: 0 } dirname="" fh=10 flags=100352
2025-01-16T08:23:59.286088Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=144
2025-01-16T08:23:59.482943Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=146 req=Request { unique: 146, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a."
2025-01-16T08:23:59.483013Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=146 e=Errno(2)
2025-01-16T08:23:59.483297Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=148 req=Request { unique: 148, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a."
2025-01-16T08:23:59.483412Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=148 e=Errno(2)
2025-01-16T08:23:59.483720Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr started req.unique=150 req=Request { unique: 150, uid: 1000, gid: 1000, pid: 34160 } filename="" fh=None flags=0
2025-01-16T08:23:59.483800Z DEBUG gvfs_fuse::fuse_api_handle_debug: getattr completed req.unique=150 reply=ttl: 1s, FileAttr: { ino: 1, size: 0, blocks: 0, atime: "2025-01-16 08:23:59.483761241", mtime: "2025-01-16 08:23:59.483761241", ctime: "2025-01-16 08:23:59.483761241", kind: Directory, perm: 700, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 8192 }
2025-01-16T08:23:59.484090Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir started req.unique=152 req=Request { unique: 152, uid: 1000, gid: 1000, pid: 34160 } dirname="" flags=100352
2025-01-16T08:23:59.484163Z DEBUG gvfs_fuse::fuse_api_handle_debug: opendir completed req.unique=152 reply=ReplyOpen { fh: 11, flags: 100352 }
2025-01-16T08:23:59.484372Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus started req.unique=154 req=Request { unique: 154, uid: 1000, gid: 1000, pid: 34160 } parent=1 fh=11 offset=0 lock_owner=0
2025-01-16T08:23:59.484455Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdirplus completed req.unique=154
2025-01-16T08:23:59.484709Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir started req.unique=156 req=Request { unique: 156, uid: 1000, gid: 1000, pid: 34160 } parent="" fh=11 offset=4
2025-01-16T08:23:59.484774Z DEBUG gvfs_fuse::fuse_api_handle_debug: readdir completed req.unique=156
2025-01-16T08:23:59.484958Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir started req.unique=158 req=Request { unique: 158, uid: 0, gid: 0, pid: 0 } dirname="" fh=11 flags=100352
2025-01-16T08:23:59.485013Z DEBUG gvfs_fuse::fuse_api_handle_debug: releasedir completed req.unique=158
2025-01-16T08:23:59.821526Z DEBUG gvfs_fuse::fuse_api_handle_debug: lookup started req.unique=160 req=Request { unique: 160, uid: 1000, gid: 1000, pid: 34160 } parent="" name="a"
2025-01-16T08:23:59.821618Z ERROR gvfs_fuse::fuse_api_handle_debug: lookup failed req.unique=160 e=Errno(2)

I've checked your run logs, and they look pretty good. However, please pay attention to the following points:

  1. Make sure to print out the file ID in the format /a/b/1s.txt(50), for example.
  2. Print the important information in the request first. For example, you can capitalize the function name and make sure to include key fields such as reqid, pid, fileId + path, filename, and the core parameters of the function.
  3. In the response, make sure to print the function name, reqid, and status first.
  4. Logging the readir and readdirplus results

@unknowntpo
Copy link
Contributor Author

@diqiu50

This is the new format I came up with:

  1. Print filename in separate kv pair, because filename might include (), it's not ok to mix them.
  2. Manually print necessary info about Request, not rely on Debug trait.
  3. In reply, we print status first
  4. See the example below
GETATTR started req.unique=8 filename="test_dir" file_id=10002 uid=501 gid=20 pid=20058 fh=None flags=0
2025-01-18T11:14:55.473292Z DEBUG gvfs_fuse::fuse_api_handle_debug: GETATTR completed req.unique=8 reply=ttl: 1s, FileAttr: { ino: 10002, size: 0, blocks: 0, atime: "2025-01-18 11:14:55.473280", mtime: "2025-01-18 11:14:55.473280", ctime: "2025-01-18 11:14:55.473280", crtime: "2025-01-18 11:14:55.473280", kind: Directory, perm: 700, nlink: 1, uid: 501, gid: 20, rdev: 0, flags: 0, blksize: 8192 }

...
## For directory listing
2025-01-20T10:00:00.123456Z INFO directory_listing: Directory entry: { inode: 10001, kind: Directory, name: ".", offset: 1 }
2025-01-20T10:00:00.123457Z INFO directory_listing: Directory entry: { inode: 1, kind: Directory, name: "..", offset: 2 }
2025-01-20T10:00:00.123458Z INFO directory_listing: Directory entry: { inode: 10002, kind: RegularFile, name: "test_file", offset: 3 }

@diqiu50
Copy link
Contributor

diqiu50 commented Jan 20, 2025

We need to print the directory list on a single line; otherwise, it’s hard to tell which request the result belongs to.

@unknowntpo
Copy link
Contributor Author

Ok, I can put them in the same line like this

2025-01-20T10:00:00.123456Z INFO directory_listing: [{ inode: 10001, kind: Directory, name: ".", offset: 1 },  
{ inode: 1, kind: Directory, name: "..", offset: 2 }, { inode: 10002, kind: RegularFile, name: "test_file", offset: 3 }]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] Add debug log for FUSE API handling.
3 participants