aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/process.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-09-30 21:41:49 +0200
committerWilliam Boman <william@redwill.se>2021-09-30 21:41:49 +0200
commita7d7520bc84269fd29ae265f6142897ccd58d5c6 (patch)
tree6003c28d3e3fa8b7afa07acfc12a52c799a320c6 /lua/nvim-lsp-installer/process.lua
parentfeat(ui): add a popup option (#100) (diff)
downloadmason-a7d7520bc84269fd29ae265f6142897ccd58d5c6.tar
mason-a7d7520bc84269fd29ae265f6142897ccd58d5c6.tar.gz
mason-a7d7520bc84269fd29ae265f6142897ccd58d5c6.tar.bz2
mason-a7d7520bc84269fd29ae265f6142897ccd58d5c6.tar.lz
mason-a7d7520bc84269fd29ae265f6142897ccd58d5c6.tar.xz
mason-a7d7520bc84269fd29ae265f6142897ccd58d5c6.tar.zst
mason-a7d7520bc84269fd29ae265f6142897ccd58d5c6.zip
fix logging at correct level, also add :LspInstallLog command
Diffstat (limited to 'lua/nvim-lsp-installer/process.lua')
-rw-r--r--lua/nvim-lsp-installer/process.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/lua/nvim-lsp-installer/process.lua b/lua/nvim-lsp-installer/process.lua
index 31523a05..9c6a8c50 100644
--- a/lua/nvim-lsp-installer/process.lua
+++ b/lua/nvim-lsp-installer/process.lua
@@ -1,4 +1,4 @@
-local Log = require "nvim-lsp-installer.log"
+local log = require "nvim-lsp-installer.log"
local platform = require "nvim-lsp-installer.platform"
local uv = vim.loop
@@ -7,7 +7,7 @@ local M = {}
local function connect_sink(pipe, sink)
return function(err, data)
if err then
- Log.error("Unexpected error when reading pipe.", err)
+ log.error("Unexpected error when reading pipe.", err)
end
if data ~= nil then
sink(data)
@@ -48,7 +48,7 @@ function M.spawn(cmd, opts, callback)
local stdio = { stdin, stdout, stderr }
- Log.debug("Spawning", cmd, opts)
+ log.debug("Spawning", cmd, opts)
local spawn_opts = {
env = opts.env,
@@ -82,13 +82,13 @@ function M.spawn(cmd, opts, callback)
end)
if handle == nil then
- Log.error("Failed to spawn process", cmd, pid)
+ log.error("Failed to spawn process", cmd, pid)
opts.stdio_sink.stderr(("Failed to spawn process cmd=%s pid=%s"):format(cmd, pid))
callback(false)
return nil, nil
end
- Log.debug("Spawned with pid", pid)
+ log.debug("Spawned with pid", pid)
stdout:read_start(connect_sink(stdout, opts.stdio_sink.stdout))
stderr:read_start(connect_sink(stderr, opts.stdio_sink.stderr))