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
This bug caused useless log lines to be written to the log file. If you
want to delete your log file, you can find it with `:checkhealth yazi`
  • Loading branch information
mikavilpas committed Jul 2, 2024
1 parent a399150 commit bcc0c7c
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 bcc0c7c

Please sign in to comment.