From 7923d252285d78b023a237d669d741dfa210ff86 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Wed, 31 Mar 2021 13:54:00 -0400 Subject: [PATCH] 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. --- crates/core/search.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/core/search.rs b/crates/core/search.rs index 4da4057b1..239ee514a 100644 --- a/crates/core/search.rs +++ b/crates/core/search.rs @@ -325,9 +325,10 @@ impl SearchWorker { } 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) {