Skip to content

Commit

Permalink
fix: not being able to disable writing DEBUG logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikavilpas committed Jul 2, 2024
1 parent a399150 commit 84dd587
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/yazi/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ end

---@param message string
function Log:debug(message)
if self.level and self.level >= log_levels.DEBUG then
vim.notify(vim.inspect({ self.level }))
if
self.level
and self.level ~= log_levels.OFF
and self.level <= log_levels.DEBUG
then
self:write_message('DEBUG', message)
end
end
Expand Down

0 comments on commit 84dd587

Please sign in to comment.