summaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2021-03-31 13:54:00 -0400
committerAndrew Gallant <jamslam@gmail.com>2021-03-31 13:54:00 -0400
commit7923d252285d78b023a237d669d741dfa210ff86 (patch)
tree9480f284dd305f2cb254161ec4d21c778211b523 /crates
parent1c3eebefec9b80b77754a1567c70bc6948a044c6 (diff)
core: add a 'trace' message
This message will emit the binary detection mechanism being used for each file. This does not noticeably increases the number of log messages, as the 'trace' level is already used for emitting messages for every file searched. This trace message was added in the course of investigating #1838.
Diffstat (limited to 'crates')
-rw-r--r--crates/core/search.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/core/search.rs b/crates/core/search.rs
index 4da4057b..239ee514 100644
--- a/crates/core/search.rs
+++ b/crates/core/search.rs
@@ -325,9 +325,10 @@ impl<W: WriteColor> SearchWorker<W> {
} else {
self.config.binary_implicit.clone()
};
- self.searcher.set_binary_detection(bin);
-
let path = subject.path();
+ log::trace!("{}: binary detection: {:?}", path.display(), bin);
+
+ self.searcher.set_binary_detection(bin);
if subject.is_stdin() {
self.search_reader(path, io::stdin().lock())
} else if self.should_preprocess(path) {