Skip to content

Commit

Permalink
fix: broken log file path for NullLsLog (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
eshepelyuk authored Nov 17, 2023
1 parent e5abf91 commit 0f38652
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lua/null-ls/logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end
---Retrieves the path of the logfile
---@return string path of the logfile
function log:get_path()
return u.path.join(vim.fn.stdpath("cache"), "null-ls.log")
return u.path.join(vim.fn.stdpath("cache"), "null-ls")
end

---Add a log entry at TRACE level
Expand Down
8 changes: 8 additions & 0 deletions test/spec/logger_spec.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
local logger = require("null-ls.logger")

describe("logger", function()
it("get_path should return log file path from cache folder", function()
local expected = vim.fn.stdpath("cache") .. "/" .. "null-ls"
assert.equals(expected, logger.get_path())
end)
end)

0 comments on commit 0f38652

Please sign in to comment.