Explorar o código

fix(debug): improve trace strings

Co-authored-by: MartinFillon <114775771+MartinFillon@users.noreply.github.com>
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Christina Sørensen %!s(int64=2) %!d(string=hai) anos
pai
achega
2ee6303ab9
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 2 2
      src/fs/file.rs
  2. 2 2
      src/main.rs

+ 2 - 2
src/fs/file.rs

@@ -204,7 +204,7 @@ impl<'dir> File<'dir> {
     /// Returns an IO error upon failure, but this shouldn’t be used to check
     /// if a `File` is a directory or not! For that, just use `is_directory()`.
     pub fn to_dir(&self) -> io::Result<Dir> {
-        trace!("to_dir reading dir");
+        trace!("to_dir: reading dir");
         Dir::read_dir(self.path.clone())
     }
 
@@ -532,7 +532,7 @@ impl<'dir> File<'dir> {
     /// but as mentioned in the size function comment above, different filesystems
     /// make it difficult to get any info about a dir by it's size, so this may be it.
     fn is_empty_directory(&self) -> bool {
-        trace!("is_empty_directory reading dir");
+        trace!("is_empty_directory: reading dir");
         match Dir::read_dir(self.path.clone()) {
             // . & .. are skipped, if the returned iterator has .next(), it's not empty
             Ok(has_files) => has_files.files(super::DotFilter::Dotfiles, None, false, false).next().is_none(),

+ 2 - 2
src/main.rs

@@ -121,7 +121,7 @@ fn main() {
             info!("matching on exa.run");
             match exa.run() {
                 Ok(exit_status) => {
-                    trace!("exa.run exit Ok(exit_status)");
+                    trace!("exa.run: exit Ok(exit_status)");
                     exit(exit_status);
                 }
 
@@ -132,7 +132,7 @@ fn main() {
 
                 Err(e) => {
                     eprintln!("{e}");
-                    trace!("exa.run exit RUNTIME_ERROR");
+                    trace!("exa.run: exit RUNTIME_ERROR");
                     exit(exits::RUNTIME_ERROR);
                 }
             }