diff options
| author | William Boman <william@redwill.se> | 2021-10-02 23:40:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-02 23:40:28 +0200 |
| commit | 3c26fe7fec6568f26b9d52cff3c96f28f0d23bb8 (patch) | |
| tree | f142da0586f31e111a6b2d6c085babb238abf618 | |
| parent | fix exe call on windows (diff) | |
| download | mason-3c26fe7fec6568f26b9d52cff3c96f28f0d23bb8.tar mason-3c26fe7fec6568f26b9d52cff3c96f28f0d23bb8.tar.gz mason-3c26fe7fec6568f26b9d52cff3c96f28f0d23bb8.tar.bz2 mason-3c26fe7fec6568f26b9d52cff3c96f28f0d23bb8.tar.lz mason-3c26fe7fec6568f26b9d52cff3c96f28f0d23bb8.tar.xz mason-3c26fe7fec6568f26b9d52cff3c96f28f0d23bb8.tar.zst mason-3c26fe7fec6568f26b9d52cff3c96f28f0d23bb8.zip | |
lower default log level to INFO (#119)
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | doc/nvim-lsp-installer.txt | 2 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/settings.lua | 2 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/ui/status-win/init.lua | 3 | ||||
| -rw-r--r-- | plugin/nvim-lsp-installer.vim | 4 |
5 files changed, 6 insertions, 7 deletions
@@ -130,7 +130,7 @@ local DEFAULT_SETTINGS = { -- Controls to which degree logs are written to the log file. It's useful to set this to vim.log.levels.DEBUG when -- debugging issues with server installations. - log_level = vim.log.levels.WARN, + log_level = vim.log.levels.INFO, -- Whether to allow LSP servers to share the same installation directory. For some servers, this effectively causes -- more than one server to be installed (and uninstalled) when executing `:LspInstall` and `:LspUninstall`. For diff --git a/doc/nvim-lsp-installer.txt b/doc/nvim-lsp-installer.txt index fceb1c76..29f26075 100644 --- a/doc/nvim-lsp-installer.txt +++ b/doc/nvim-lsp-installer.txt @@ -147,7 +147,7 @@ The following settings are applied by default. > -- Controls to which degree logs are written to the log file. It's useful to set this to vim.log.levels.DEBUG when -- debugging issues with server installations. - log_level = vim.log.levels.WARN, + log_level = vim.log.levels.INFO, -- Whether to allow LSP servers to share the same installation directory. For some servers, this effectively causes -- more than one server to be installed (and uninstalled) when executing `:LspInstall` and `:LspUninstall`. For diff --git a/lua/nvim-lsp-installer/settings.lua b/lua/nvim-lsp-installer/settings.lua index eb01c78c..1d7fa283 100644 --- a/lua/nvim-lsp-installer/settings.lua +++ b/lua/nvim-lsp-installer/settings.lua @@ -12,7 +12,7 @@ local DEFAULT_SETTINGS = { -- Controls to which degree logs are written to the log file. It's useful to set this to vim.log.levels.DEBUG when -- debugging issues with server installations. - log_level = vim.log.levels.WARN, + log_level = vim.log.levels.INFO, -- Whether to allow LSP servers to share the same installation directory. For some servers, this effectively causes -- more than one server to be installed (and uninstalled) when executing `:LspInstall` and `:LspUninstall`. For diff --git a/lua/nvim-lsp-installer/ui/status-win/init.lua b/lua/nvim-lsp-installer/ui/status-win/init.lua index 143dcba8..b82aef0a 100644 --- a/lua/nvim-lsp-installer/ui/status-win/init.lua +++ b/lua/nvim-lsp-installer/ui/status-win/init.lua @@ -283,7 +283,7 @@ local function init(all_servers) state.servers[server.name].installer.is_running = true end) - log.debug("Starting install", server.name, requested_version) + log.fmt_info("Starting install server_name=%s, requested_version=%s", server.name, requested_version or "N/A") server:install_attached({ requested_server_version = requested_version, @@ -302,6 +302,7 @@ local function init(all_servers) end, }, }, function(success) + log.fmt_info("Installation completed server_name=%s, success=%s", server.name, success) mutate_state(function(state) if success then -- release stdout/err output table.. hopefully ¯\_(ツ)_/¯ diff --git a/plugin/nvim-lsp-installer.vim b/plugin/nvim-lsp-installer.vim index b0a77865..2cd3485b 100644 --- a/plugin/nvim-lsp-installer.vim +++ b/plugin/nvim-lsp-installer.vim @@ -41,9 +41,7 @@ function! s:LspInstallInfo() abort endfunction function! s:LspInstallLog() abort - let l:log_file = luaeval("require'nvim-lsp-installer.log'.outfile") - tabnew - exe 'e ' .. l:log_file + exe 'tabnew ' .. luaeval("require'nvim-lsp-installer.log'.outfile") endfunction command! -nargs=+ -complete=custom,s:LspInstallCompletion LspInstall exe s:LspInstall("<args>") |
