Skip to content

Commit 0233f19

Browse files
authored
fix(logger): use stdpath("log") dir to find plenary log (#278)
1 parent 7854669 commit 0233f19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lua/null-ls/logger.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end
5555
--- Retrieves the path of the logfile
5656
---@return string path path of the logfile
5757
function log:get_path()
58-
return u.path.join(vim.fn.stdpath("cache") --[[@as string]], "null-ls.log")
58+
return u.path.join(vim.fn.stdpath("log") --[[@as string]], "null-ls.log")
5959
end
6060

6161
---Add a log entry at TRACE level

test/spec/logger_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local logger = require("null-ls.logger")
22

33
describe("logger", function()
44
it("get_path should return log file path from cache folder", function()
5-
local expected = vim.fn.stdpath("cache") .. "/" .. "null-ls.log"
5+
local expected = vim.fn.stdpath("log") .. "/" .. "null-ls.log"
66
assert.equals(expected, logger:get_path())
77
end)
88
end)

0 commit comments

Comments
 (0)