From a7d7520bc84269fd29ae265f6142897ccd58d5c6 Mon Sep 17 00:00:00 2001 From: William Boman Date: Thu, 30 Sep 2021 21:41:49 +0200 Subject: fix logging at correct level, also add :LspInstallLog command --- lua/nvim-lsp-installer/process.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lua/nvim-lsp-installer/process.lua') 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)) -- cgit v1.2.3-70-g09d2