From 941fb160c5397e243e55f55d1f01608b0b360a6e Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Tue, 22 Sep 2020 10:04:02 -0400 Subject: [PATCH] fix: Don't log so much for users. Fix #91 --- lua/telescope/log.lua | 3 ++- lua/telescope/pickers.lua | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/telescope/log.lua b/lua/telescope/log.lua index a04ef42..2796dbb 100644 --- a/lua/telescope/log.lua +++ b/lua/telescope/log.lua @@ -1,4 +1,5 @@ + return require('plenary.log').new { plugin = 'telescope', - level = 'info', + level = (vim.loop.os_getenv("USER") == 'tj' and 'debug') or 'info', } diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index bbafd07..a321858 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -581,7 +581,7 @@ function Picker:set_selection(row) end if not self:can_select_row(row) then - log.info("Cannot select row:", row, self.manager:num_results(), self.max_results) + log.debug("Cannot select row:", row, self.manager:num_results(), self.max_results) return end @@ -665,7 +665,7 @@ end -- TODO: We should consider adding `process_bulk` or `bulk_entry_manager` for things -- that we always know the items and can score quickly, so as to avoid drawing so much. pickers.entry_manager = function(max_results, set_entry, info) - log.debug("Creating entry_manager...") + log.trace("Creating entry_manager...") info = info or {} info.looped = 0