Skip to content

Commit 145e604

Browse files
committed
new: added logging to filesystem namespace
1 parent b8b7195 commit 145e604

File tree

1 file changed

+4
-1
lines changed
  • src/agent/namespaces/filesystem

1 file changed

+4
-1
lines changed

src/agent/namespaces/filesystem/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ impl Action for ReadFolder {
105105
}
106106
}
107107

108+
log::info!("read-folder '{folder}' -> {} bytes", output.len());
109+
108110
Ok(Some(output))
109111
} else {
110112
Err(anyhow!("can't read {}: {:?}", folder, ret))
@@ -136,8 +138,9 @@ impl Action for ReadFile {
136138
payload: Option<String>,
137139
) -> Result<Option<String>> {
138140
let filepath = payload.unwrap();
139-
let ret = std::fs::read_to_string(filepath);
141+
let ret = std::fs::read_to_string(&filepath);
140142
if let Ok(contents) = ret {
143+
log::info!("read-file '{filepath}' -> {} bytes", contents.len());
141144
Ok(Some(contents))
142145
} else {
143146
let err = ret.err().unwrap();

0 commit comments

Comments
 (0)